kafka replay speed: use franz-go fork #9203
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using a fork
Starts using a fork of franz-go until we can get a version of twmb/franz-go#803 merged upstream. The maintainer was ok with the approach, so I think using a fork won't diverge us in the long run.
As a result this PR also deletes all the copied code we have from franz-go for partition parsing.
Metrics
Using a fork allows us to just use the metrics that kprom exposes instead of tracking them ourselves.
cortex_ingest_storage_reader_fetches_compressed_bytes_total
which was a copy of kprom'scortex_ingest_storage_reader_fetch_compressed_bytes_total
cortex_ingest_storage_reader_fetched_bytes_total
which was a copy of kprom'scortex_ingest_storage_reader_fetch_bytes_total
Clean up fetching
Properly close spans when we double-fetch a record. Also emit a span event to show that we've ignored the record.
We also assert on the response we get instead of indexing into an array and hoping it contains what we asked for. I don't think this check should ever fail in normal operations. It's there as a stopgap to consuming wrong data in case there's a bug somewhere.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.