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[MQB]: remove maxDeliveryAttempts range check #496

Merged

Conversation

emelialei88
Copy link
Collaborator

A user uncovered an unfortunate (and undocumented) limitation in the behavior of poison pill configurations, we do not allow users to set this to 1-4 (using the default broker configurations).

We should allow users to configure these as valid values for the number of delivery attempts.

@emelialei88 emelialei88 force-pushed the fix/maxDeliveryAttempts-limit branch from 687408a to 31dc7b8 Compare November 1, 2024 15:56
@emelialei88 emelialei88 changed the title commented out maxDeliveryAttempts range check fix[MQB]: commented out maxDeliveryAttempts range check Nov 1, 2024
@emelialei88 emelialei88 changed the title fix[MQB]: commented out maxDeliveryAttempts range check Fix[MQB]: commented out maxDeliveryAttempts range check Nov 1, 2024
@emelialei88 emelialei88 marked this pull request as ready for review November 1, 2024 16:13
@emelialei88 emelialei88 requested a review from a team as a code owner November 1, 2024 16:13
@emelialei88 emelialei88 marked this pull request as draft November 1, 2024 16:13
@emelialei88 emelialei88 changed the title Fix[MQB]: commented out maxDeliveryAttempts range check Fix[MQB]: commented out maxDeliveryAttempts range check Nov 2, 2024
@emelialei88 emelialei88 force-pushed the fix/maxDeliveryAttempts-limit branch from fdaf867 to 186ba23 Compare November 2, 2024 22:57
@emelialei88 emelialei88 changed the title Fix[MQB]: commented out maxDeliveryAttempts range check Fix[MQB]: remove maxDeliveryAttempts range check Nov 4, 2024
@emelialei88 emelialei88 marked this pull request as ready for review November 4, 2024 16:04
Copy link
Collaborator

@pniedzielski pniedzielski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good test and change. I think we should try to squash some of these changes for the sake of the commit history, and maybe rip one change out into its own commit.

.gitignore Outdated Show resolved Hide resolved
src/integration-tests/test_poison_messages.py Show resolved Hide resolved
src/integration-tests/test_poison_messages.py Show resolved Hide resolved
@emelialei88 emelialei88 force-pushed the fix/maxDeliveryAttempts-limit branch from 654d77b to ee0c1ea Compare November 4, 2024 17:00
- The change made in _crash_consumer_restart_leader comment is to match
the comment with the code.
- Before removing the if block in `mqbblp_domain.cpp`, `maxDeliveryAttempts`
is reset to 5 if it's between 1-4, which is wrong since we want users to be
able to set it to any value. The test `test_poison_rda_reset_priority_active`
originally set `maxDeliveryAttempts` to 2 but attempted 3 deliveries.
Before removing the if block this would work since `maxDeliveryAttempts` is
reset to 5, but after the fix, the initial value for `maxDeliveryAttempts`
should also change to 3.

Signed-off-by: Emelia Lei <wlei29@bloomberg.net>
@emelialei88 emelialei88 force-pushed the fix/maxDeliveryAttempts-limit branch from ee0c1ea to f7ea92b Compare November 4, 2024 17:27
Copy link
Collaborator

@pniedzielski pniedzielski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I'll wait for CI to fire one more time before merging, but LGTM

@pniedzielski
Copy link
Collaborator

Test failure seems unrelated; will look into in a different changeset.

@pniedzielski pniedzielski merged commit 6ee6823 into bloomberg:main Nov 5, 2024
29 of 30 checks passed
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