forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver,storage: calculate GCBytesAge in AddSSTable for points
Currently, the stats calculations in `AddSSTable` and `CheckSSTConflicts` does not adjust for any GCBytesAge differences that arise from sst keys deleting or shadowing engine keys. This results in mismatching GCBytesAge values if we were to run the existing TestEvalAddSSTable test with sufficiently-large "now" timestamps to accrue GCBytesAge. This change updates TestEvalAddSSTable to multiply each timestamp with 1e9 so that it operates in full-second increments to see more interesting GCBytesAge behaviour. It also updates the code path where we mass-update SST timestamps to make the corresponding GCBytesAge adjustment. Finally, it ensures that GCBytesAge is accrued from the right timestamps in cases of sst keys / tombstones shadowing engine keys / tombstones. Note that this change only fixes GCBytesAge for point keys; a fix for range keys will come in a follow-up. Fixes cockroachdb#82920. Release note: None.
- Loading branch information
Showing
5 changed files
with
174 additions
and
74 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
Oops, something went wrong.