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] Fix consumer doesn't acknowledge all chunk message Ids #321

Merged
merged 6 commits into from
Oct 7, 2023

Conversation

RobertIndie
Copy link
Member

Fixes #320

Motivation

Currently, the consumer only acknowledges the last chunk message ID. This will lead to some messages not being acknowledged and the message backlog doesn't get cleaned up.

Modifications

Add the chunk message Id list into the ChunkedMessageIdImpl. When the consumer acknowledges a chunked message , it will acknowledge all message Ids in that list

Verifying this change

This change is already covered by existing tests.

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

@RobertIndie RobertIndie added the bug Something isn't working label Sep 27, 2023
@RobertIndie RobertIndie self-assigned this Sep 27, 2023
@BewareMyPower BewareMyPower added this to the 3.4.0 milestone Sep 27, 2023
lib/ProducerImpl.cc Outdated Show resolved Hide resolved
lib/ChunkMessageIdImpl.h Outdated Show resolved Hide resolved
lib/AckGroupingTracker.cc Outdated Show resolved Hide resolved
lib/AckGroupingTracker.cc Outdated Show resolved Hide resolved
lib/ConsumerImpl.cc Outdated Show resolved Hide resolved
lib/ProducerImpl.cc Outdated Show resolved Hide resolved
@shibd
Copy link
Member

shibd commented Sep 28, 2023

BTW: This variable seems useless.

std::unordered_map<std::string, ChunkedMessageCtx> chunkedMessagesMap_;

@BewareMyPower
Copy link
Contributor

BewareMyPower commented Oct 4, 2023

I will review this PR again after returning from the vacation in 6th Oct.

@BewareMyPower BewareMyPower merged commit eea59bb into apache:main Oct 7, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Msgbacklog is not cleared when individual acknowledge chunked messages
3 participants