-
Notifications
You must be signed in to change notification settings - Fork 14.8k
KAFKA-20002: Reset-by-duration should not hand back task to state-updater #21167
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
base: trunk
Are you sure you want to change the base?
Conversation
…ater This bug was introduced via KAFKA-18015.
lucasbru
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where active tasks undergoing reset-by-duration were incorrectly being handed back to the state updater. The state updater is responsible for restoring task state, not managing active tasks during offset reset operations. The incorrect behavior was introduced in KAFKA-18015.
Key Changes:
- Removed erroneous
stateUpdater.add(task)call frommaybeInitTaskTimeoutsOrThrowmethod
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pankraz76
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
| final Task task = getActiveTask(partition); | ||
| task.maybeInitTaskTimeoutOrThrow(nowMs, timeoutException); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| final Task task = getActiveTask(partition); | |
| task.maybeInitTaskTimeoutOrThrow(nowMs, timeoutException); | |
| getActiveTask(partition).maybeInitTaskTimeoutOrThrow(nowMs, timeoutException); |
coupling now seems obsolete, considering cohesion.
| ) { | ||
| for (final TopicPartition partition : partitions) { | ||
| final Task task = getActiveTask(partition); | ||
| task.maybeInitTaskTimeoutOrThrow(nowMs, timeoutException); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty for boiling down.
Now we have reached final version, can not take away anymore.
This bug was introduced via KAFKA-18015.
Reviewers: Lucas Brutschy lbrutschy@confluent.io