-
Notifications
You must be signed in to change notification settings - Fork 4.1k
gc.Info.AffectedKeys is not updated correctly by gc.Run in come cases. #84164
Copy link
Copy link
Closed
Labels
A-kv-replicationRelating to Raft, consensus, and coordination.Relating to Raft, consensus, and coordination.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
Describe the problem
gc.Info.AffectedKeys is not updated correctly in come cases.
If we have a following data set:
| a b c d e f g h i j
---+----------------------
9 |
8 |
7 |
6 |
>5 | A1 B1
4 | b2
3 | b3
2 | b4
1 |
'>' marks GC threshold.
If batch threshold triggers flushing of GC request at 'b2' (note that iteration is from highest to lowest keys and timestamps) then key 'a' is also counted as affected key.
To Reproduce
Use test data above with gc_test and set threshold to 45 bytes to trigger request at the right mvcc key.
The unfortunate effect of this bug is that tests that assert of Info post GC fail.
Jira issue: CRDB-17502
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-replicationRelating to Raft, consensus, and coordination.Relating to Raft, consensus, and coordination.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.