Skip to content

Remove GC and callback from store.go#3840

Closed
grobinson-grafana wants to merge 1 commit intoprometheus:mainfrom
grobinson-grafana:grobinson/remove-gc
Closed

Remove GC and callback from store.go#3840
grobinson-grafana wants to merge 1 commit intoprometheus:mainfrom
grobinson-grafana:grobinson/remove-gc

Conversation

@grobinson-grafana
Copy link
Collaborator

@grobinson-grafana grobinson-grafana commented May 13, 2024

This commit removes the GC and callback function from store.go to address a number of data races and deadlocks that have occurred in the past (#2040 and #3175). The store is no longer responsible for removing resolved alerts after some elapsed period of time, and is instead deferred to the consumer of the store (as done in #2040). This change avoids situations where the callback function for the store attempts to acquire a mutex on A but another goroutine holds the mutex for A and needs to acquire the mutex in the store, causing a deadlock.

This commit removes the GC and callback function from store.go
to address a number of data races that have occurred in the past
(prometheus#2040 and prometheus#3648). The store is no longer responsible for removing
resolved alerts after some elapsed period of time, and is instead
deferred to the consumer of the store (as done in prometheus#2040 and prometheus#3648).

Signed-off-by: George Robinson <george.robinson@grafana.com>
@grobinson-grafana grobinson-grafana marked this pull request as ready for review May 26, 2024 18:50
@grobinson-grafana grobinson-grafana deleted the grobinson/remove-gc branch October 7, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant