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

Fix flaky shovel spec and potential bug in source ack #755

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

spuun
Copy link
Member

@spuun spuun commented Aug 16, 2024

WHAT is this pull request doing?

The should ack all messages that has been moved spec was very flaky. When debugging it I found what I think was a bug, that Source#ack wouldn't ack on stop depending on the values of delivery_tag and prefetch. Because we batch acks, the delivery_tag had to be a multiple of half the prefetch for the ack to happen. Now #ack has a optional parameter to not batch.

The spec succeeded (but not always because flaky?) because it used prefetch 1. It's refactored to make sure that there should be unacked messages when the shovel is terminated.

HOW can this pull request be tested?

Run specs

@carlhoerberg carlhoerberg merged commit 5aeda77 into main Aug 21, 2024
21 of 25 checks passed
@carlhoerberg carlhoerberg deleted the fix-flaky-shovel-spec branch August 21, 2024 12:24
spuun added a commit that referenced this pull request Aug 26, 2024
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.

4 participants