Skip to content

gc.Info.AffectedKeys is not updated correctly by gc.Run in come cases. #84164

@aliher1911

Description

@aliher1911

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

Metadata

Metadata

Assignees

Labels

A-kv-replicationRelating to Raft, consensus, and coordination.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions