-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat(spool): Introduce in-memory EnvelopeBuffer
as alternative to the old spooler
#3863
Conversation
EnvelopeBuffer
as alternative to the old spooler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, reviewed offline. Will discuss next steps
/// Used to notify callers of `peek()` of any changes in the buffer. | ||
notify: tokio::sync::Notify, | ||
/// Used to notify callers of `peek()` of any changes in the buffer. | ||
changed: AtomicBool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fields have the same documentation, is that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, both are used for notification. I didn't find a good way to make it work with only a Notify
.
Co-authored-by: Sebastian Zivota <[email protected]>
Add a gauge metric for the total number of stacks in the priority queue.
`test_histogram_outliers` became flaky after getsentry/relay#3863. Add info to the assert to get more insights.
This PR introduces a new envelope buffer as designed in https://github.com/getsentry/team-ingest/issues/345, though which all envelopes flow before being processed. Buffered envelopes are stored in per-project stacks. Stacks are sorted by whether the project configs needed for processing are ready, and by latest receive time, such that the latest envelope with a valid project config is always the first in line to be processed.
Currently, only memory-based envelope stacks are supported, but this PR already contains the implementation for disk-based stacks as well.
Class Diagram (partial)
ref: https://github.com/getsentry/team-ingest/issues/345