-
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(tsdb): minimize lock contention when adding new fields or measure…
…ments (#21228) fields.idx frequent writes cause lock contention and fields.idx is recreated when a field or measurement is added in a WritePointsWithContext() This eliminates locking during the actual file rewrite, and limits it to the times when the MeasurementFieldSet is actually being read or written in memory and when the new file is being renamed. Test verification of correct behavior by checking the fields.idx file matches the in-memory copy after heavily parallel measurement addition. Co-authored-by: davidby-influx <[email protected]>
- Loading branch information
1 parent
de1d8dc
commit 7b1763e
Showing
3 changed files
with
150 additions
and
42 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
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