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 XREADGROUP command didn't fetch the latest metadata after creating a consumer #2153

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

Yangsx-1
Copy link
Contributor

The function RangeWithPending needs to fetch the newset data of consumer group metadata, or it will exist a bug.

For example, a consumer group is empty with no consumer and function RangeWithPending will create a consumer for it when necessary. But we've fetched the group's metadata before creating the consumer, if we don't get the newest data the group metadata we write later will be wrong. The prefetched data's consumer number is 0, the newest data's consumer number is 1, we'll write 0 back if we don't fetch the newest data which leads to a wrong number of consumer.

@git-hulk git-hulk changed the title fix: xreadgroup should fetch the newest group metadata after creating consumer Fix XREADGROUP command didn't fetch the latest metadata after creating a consumer Mar 11, 2024
Copy link

sonarcloud bot commented Mar 11, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
7.0% Duplication on New Code (required ≤ 5%)

See analysis details on SonarCloud

@git-hulk git-hulk merged commit 2c07b16 into apache:unstable Mar 11, 2024
29 of 30 checks passed
@Yangsx-1 Yangsx-1 deleted the fix-rangewithpending branch March 14, 2024 07:25
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