-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(cache): Move buffering of pending envelope to ProjectCache (#1879)
These changes moving buffering of the incoming envelopes in the `ProjectCache`. Current implementation still keeps, so called queue in memory and using `HashMap` with a composite key `QueueKey {key, sampling_key}`, where `sampling_key` can be the same as a key if there is no sampling project identified. The values to these keys are `Vec` of boxed `Envelope` with their `EnvelopeContext`. Once we get an update for project state, we check all variants of `QueueKey` which contains the current `ProjectKey` and if all the project states are cached we try to flush buffered envelopes indexed by these `QeueuKey`. The envelops will be buffered if: * the project state is not fetched yet * root project is here but the sampling project state is not fetched yet * the sampling project state is here but the root project is not fetched yet This change also removes all the buffering from the `Project` and reduces its responsibility. Now it just keeps its own state and configuration and the envelope handling is done outside of it.
- Loading branch information
Showing
4 changed files
with
215 additions
and
170 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.