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: updated dedupe to check history of sent packets #972

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mvandevalk
Copy link

@mvandevalk mvandevalk commented Aug 15, 2024

Updated the dedupe function to checks if a packet has already been seen before, based on the packet's broker ID and counter. If the packet is a duplicate (already seen before), it is not forwarded again. The temporary list for dedupe is configurable as part of the init options, defaults to 100.

This bug occurs with a mongoDB persistence configuration and have not been able to reproduce with a default persistence settings.

Fixes #955

…nd adds it temporary to memory for tracking duplicates
Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Thanks for opening a PR! Can you please add a unit test?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10404669588

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 99.745%

Totals Coverage Status
Change from base Build 9447929816: 0.002%
Covered Lines: 832
Relevant Lines: 832

💛 - Coveralls

@robertsLando robertsLando changed the title fix: #955 - Updated dedupe to check history of sent packets fix: updated dedupe to check history of sent packets Aug 28, 2024
@robertsLando
Copy link
Member

robertsLando commented Aug 28, 2024

@mvandevalk I think this should be fixed on mongo persistence instead, if this happens it means the packets are not processed in the correct order. The way dedupe works is good as it increments the brokerCounter every time a packet is processed so it can skips packets with an old broker counter

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.

[bug] Not all messages are consumed when dedupe is enabled
4 participants