fix: improve gc in provider and store#5013
Merged
siavashs merged 6 commits intoprometheus:mainfrom Feb 19, 2026
Merged
Conversation
Break up GC into stages to release the locks earlier. This should avoid blocking while alerts are deleted from internal caches. The callbacks are now called without holding locks in the caller. Modify the marker and PostDelete callback to accept multiple arguments. Signed-off-by: Siavash Safi <siavash@cloudflare.com>
1b16d2e to
31ae468
Compare
ultrotter
reviewed
Feb 17, 2026
Signed-off-by: Siavash Safi <siavash@cloudflare.com>
Signed-off-by: Siavash Safi <siavash@cloudflare.com>
ultrotter
approved these changes
Feb 18, 2026
Signed-off-by: Siavash Safi <siavash@cloudflare.com>
ultrotter
requested changes
Feb 18, 2026
ultrotter
approved these changes
Feb 19, 2026
coatico
pushed a commit
to coatico/alertmanager
that referenced
this pull request
Mar 10, 2026
* fix: improve gc in provider and store Break up GC into stages to release the locks earlier. This should avoid blocking while alerts are deleted from internal caches. The callbacks are now called without holding locks in the caller. Add PostGC callback to mem provider. Modify the marker Delete method to accept multiple arguments. Store does not copy deleted alerts to avoid unnecessary allocations. Signed-off-by: Siavash Safi <siavash@cloudflare.com> Signed-off-by: VAN LINT <marnix.vanlint@worldline.com>
coatico
pushed a commit
to coatico/alertmanager
that referenced
this pull request
Mar 10, 2026
* fix: improve gc in provider and store Break up GC into stages to release the locks earlier. This should avoid blocking while alerts are deleted from internal caches. The callbacks are now called without holding locks in the caller. Add PostGC callback to mem provider. Modify the marker Delete method to accept multiple arguments. Store does not copy deleted alerts to avoid unnecessary allocations. Signed-off-by: Siavash Safi <siavash@cloudflare.com> Signed-off-by: VAN LINT <marnix.vanlint@worldline.com>
SoloJacobs
pushed a commit
to SoloJacobs/alertmanager
that referenced
this pull request
Mar 15, 2026
* fix: improve gc in provider and store Break up GC into stages to release the locks earlier. This should avoid blocking while alerts are deleted from internal caches. The callbacks are now called without holding locks in the caller. Add PostGC callback to mem provider. Modify the marker Delete method to accept multiple arguments. Store does not copy deleted alerts to avoid unnecessary allocations. Signed-off-by: Siavash Safi <siavash@cloudflare.com>
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.
Break up GC into stages to release the locks earlier.
This should avoid blocking while alerts are deleted from internal caches.
The callbacks are now called without holding locks in the caller.
Add
PostGCcallback to mem provider.Modify the marker
Deletemethod to accept multiple arguments.Store does not copy deleted alerts to avoid unnecessary allocations.
Pull Request Checklist
Please check all the applicable boxes.
benchstatto compare benchmarksWhich user-facing changes does this PR introduce?