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

consumer: combine offset map from multiple partially successful replies #59

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

bashtanov
Copy link
Contributor

If the number of partitions is high and leadership transfers happen often we may be unable to get a single all-successful result for a long time. Instead, combine a full result out of tolerate partially successful ones.

for i := 0; i < int(nPartitions); i++ {
if result[i].err == nil {
if !haveResult[i] {
seenPartitions += 1
Copy link
Contributor

Choose a reason for hiding this comment

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

you are incrementing seenPartitions only when "result[i] is not error" this means that this method will succeed only after you get a complete successful result which is the same behavior as before from what i read

you are also incrementing seenPartitions only when you get the result for the first time so it won't ever actually succeed if there is at least one partial failure. seenPartitions == nPartitions won't ever be true in that case

If the number of partitions is high and leadership transfers happen often we may
be unable to get a single all-successful result for a long time. Instead,
combine a full result out of tolerate partially successful ones.
@bashtanov bashtanov force-pushed the combine-offset-results branch from c2fbce4 to 237efd0 Compare October 22, 2024 23:44
@bashtanov bashtanov requested a review from nvartolomei October 22, 2024 23:45
@bashtanov bashtanov merged commit 7bbf8c8 into redpanda-data:main Oct 23, 2024
2 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.

3 participants