Repository navigation
Conversation
Collaborator
|
The fix is correct. There is one concrete remaining memory-exhaustion risk: the cache retains complete protobuf messages, including unknown fields ( Currently we evict a random record. We can drop a fresh decision before its swap subscribes (about a 1-in-1,024 chance per new entry). Evicting the oldest entry first would avoid this, but it's optional. |
Collaborator
Author
|
I striped most of the protobuf message and only retain the swap hash of the risk decision. |
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.
Limit the static Loop In risk-decision replay cache to 1,024 swap hashes shared by accepted and rejected decisions. Eviction removes all associated cached state; existing-hash updates preserve their slot. Persistence attempts, delivery to active subscribers, and replay within the capacity limit are preserved.
Add receive-loop flood coverage across all persistence modes, plus replay, existing-hash updates, and live delivery at capacity.
Validation:
go test -race ./notifications ./staticaddr/loopingolangci-lint run --new-from-rev=upstream/master ./notifications(0 issues)Pull Request Checklist
docs/release-notes/release-notes-next.md, or apply theno-changeloglabel (required by CI).