-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deadlock in engine/measurement fields
The OnReplace func ends up trying to acquire locks on MeasurementFields. When its called via snapshotting, this can deadlock because the snapshotting goroutine also holds an RLock on the engine. If a delete measurement calls is run at the right time, it will lock the MeasurementFields and try to acquire a lock on the engine to disable compactions. This creates a deadlock. To fix this, the OnReplace callback is moved to a function param to allow only Replace calls as part of a compaction to invoke it as opposed to both snapshotting and compactions. Fixes #8713
- Loading branch information
Showing
2 changed files
with
15 additions
and
8 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