-
Notifications
You must be signed in to change notification settings - Fork 552
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
Implement KIP-496 OffsetDelete #8669
Conversation
- Returned specifically in offset_delete requests when a deletion is attempted for an offset for which contains an active group subscription.
d78d2b8
to
aa2d051
Compare
Changes in force-push
|
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.
looks real good. just a few questions about how the group is changing state in various situations.
if (in_state(group_state::empty) || !subscribed(offset.topic)) { | ||
vlog(_ctxlog.debug, "Deleting group offset {}", offset); | ||
_offsets.erase(offset); | ||
_pending_offset_commits.erase(offset); |
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.
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.
thread started on slack to discuss
- This public method can be invoked to allow the caller to manually delete desired offsets. - The internal `_offsets` and `_pending_offset_commits` caches will have the respecitive offsets removed only if the group is in an `empty` state or if there are no active subscriptions for the given offset.
- Genericising the delete_expired_offsets method into a private method called delete_offsets which will delete the requested offsets of a group. - `delete_expired_offsets` then calls `delete_offsets` with the expired_offsets that it has obtained as designated for deletion.
aa2d051
to
3092a94
Compare
Seeing a timeout in CI for the offset deletion test.
|
3092a94
to
2db2e13
Compare
Changes in force-push
|
/ci-repeat 10 |
One failure. It looks like when we delete the group in It didn't actually occur to me that group had a gate. So there may also be a similar bug present in offset retention, but just far more likely to occur with offset delete and your extensive testing.
|
Changes in force-push
|
/ci-repeat 10 |
i thought the plan was to run more than this? |
/ci-repeat 10 |
1 similar comment
/ci-repeat 10 |
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 pending ci results
9a697ef
to
fa50bde
Compare
/ci-repeat 10 |
- Offset delete requests will route to the group_manager where the request will be parsed into a list of topic/partitions and eventually passed to group::delete_offsets. - The response is built up from the result of deleted offsets, error code kafka::group_subscribed_to_topic will be returned for offsets that could not be deleted due to having existing subscriptions active.
fa50bde
to
53f9354
Compare
/ci-repeat 10 |
- The group must be shutdown before _groups.erase(it) is called. There is an active gate and there could be pending futures executing the moment erase is called. - Calling shutdown() on the group shuts the gate and closes all pending work so that erase(group) may safely be called.
53f9354
to
665c253
Compare
Changes in force-push
|
This pull request adds support for the OffsetDelete API to redpanda. This API allows the user to manually remove offsets that are tracked by redpanda within the
__consumer_groups
topic. The offsets requested to be removed will be removed only if the group in question is in a state ofdead
or there are no active subscriptions for the topic/partitions to be deleted. If there are active subscriptions for a requested offset to be deleted a new kafka error codegroup_subscribed_to_topic
is to be returned.Backports Required
UX Changes
Release Notes
Features