Skip to content
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

kgo: allow PreTxnCommitFnContext to modify empty offsets #605

Merged
merged 2 commits into from
Oct 22, 2023
Merged

kgo: allow PreTxnCommitFnContext to modify empty offsets #605

merged 2 commits into from
Oct 22, 2023

Conversation

twmb
Copy link
Owner

@twmb twmb commented Oct 21, 2023

This replaces #580, introducing one earlier commit that makes grabbing the group memberID and generation atomic (and thus, lock free / no concurrency issues).

twmb and others added 2 commits October 21, 2023 17:19
Previously these required a mutex on write and read because of the rare
(and mostly erroneous)  chance that a person is committing during a
rebalance.

Well, that makes the next transactional commit harder and is overkill --
switching to atomics doesn't change any correctness bit but allows us to
worry about deadlocks just a bit less.
This builds the TxnOffsetCommitRequest early so that the hook can modify
it. If the modified request has no topics to commit, then we abort as
though uncommitted was empty.
@twmb twmb merged commit ec02fac into master Oct 22, 2023
6 checks passed
@twmb twmb deleted the 580 branch October 22, 2023 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants