Improve Duplicate Suppression with Time Windows and ACK/Data Partitioning#1778
Open
robekl wants to merge 1 commit intomeshcore-dev:devfrom
Open
Improve Duplicate Suppression with Time Windows and ACK/Data Partitioning#1778robekl wants to merge 1 commit intomeshcore-dev:devfrom
robekl wants to merge 1 commit intomeshcore-dev:devfrom
Conversation
Replace pure cyclic duplicate detection with a bounded time-window model and separate ACK/non-ACK dedupe paths. Entries now track seen timestamps, reuse expired slots first, and only overwrite cyclic slots under sustained pressure. This improves replay/duplicate resistance during bursty traffic while keeping fixed memory and simple lookup behavior. Includes lightweight counters for ACK/data hit visibility and full-table overwrite pressure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change upgrades duplicate suppression from a pure cyclic overwrite model to a bounded time-window model, and separates ACK dedupe from non-ACK packet dedupe. It keeps fixed memory usage and simple lookup behavior while improving resilience under bursty traffic.
Problem
The previous duplicate suppression behavior depended mainly on table capacity and overwrite order. Under sustained or bursty traffic, duplicate keys could be evicted quickly and then treated as new again. ACK-heavy periods could also consume dedupe capacity in ways that indirectly reduced protection for non-ACK packets.
Impact When It Happens
When dedupe protection is pressured, the mesh can experience:
Scope of the Problem
This problem primarily appears in:
It is less visible in quiet or lightly loaded meshes but still a latent reliability risk.
Description of the Change
The dedupe table now uses:
How This Addresses the Problem
Scope of the Fix
In scope:
Out of scope:
Benefits
Drawbacks / Tradeoffs
New Complexity Introduced
ROI
High.