-
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(storage): Fix issue where fields re-appear
Fixes #10052 This commit fixes an issue where field keys would reappear in results when querying previously dropped measurements. The issue manifests itself when duplicates of a new series are inserted into the `inmem` index. In this case, a map that tracks the number of series belonging to a measurement was incorrectly incremented once for each duplication of the series. Then, when it came time to drop the measurement, the index assumed there were several series belonging to the measurement left in the index (because the counter was higher than it should be). The result of that was that the `fields.idx` file (which stores a mapping between measurements and field keys) was not truncated and rebuilt. This left old field keys in that file, which were then returned in subsequent queries over all field keys.
- Loading branch information
Showing
2 changed files
with
66 additions
and
5 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