-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/offset_translator: remove unsafe bootstrap code #15919
Conversation
oh nice find. sounds like this could have (or was?) been a real headache!
Anything to do to remove the old bits or make them unlikely to be used incorrectly going forward? |
Looks like a little build error
|
When the corresponding kvstore state is not found, we should recover offset_translator state from the log, not use configuration_manager state - the latter is incorrect because there are other batch types contributing to offset delta, not just configuration batches. This code is a vestige from the time when the separate offset_translator component was just introduced and its kvstore state needed to be bootstrapped from configuration_manager state.
e5714ba
to
8c38ccf
Compare
Right, to my knowledge this issue hasn't occurred in real deployments - we are lucky that we checkpoint the state at the earliest possible opportunity, so that empty kvstore state is unlikely to occur for existing partitions. I was reminded of this piece of code when I was thinking about how to reset a buggy offset translator map that has been accidentally persisted - in theory just nuking kvstore state should be enough, but currently this is not the case.
🤦♂️ fixed |
new failures in https://buildkite.com/redpanda/redpanda/builds/43406#018cd622-adf9-41c8-ad82-1564496e42db:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/43406#018cd622-adf9-41c8-ad82-1564496e42db |
/backport v23.3.x |
/backport v23.2.x |
/backport v23.1.x |
When the corresponding kvstore state is not found, we should recover offset_translator state from the log, not use configuration_manager state - the latter is incorrect because there are other batch types contributing to offset delta, not just configuration batches. This code is a vestige from the time when the separate offset_translator component was just introduced and its kvstore state needed to be bootstrapped from configuration_manager state.
Backports Required
Release Notes