Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aliher1911 opened this issue Jul 11, 2022 · 1 comment · Fixed by #84165
Closed

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

aliher1911 opened this issue Jul 11, 2022 · 1 comment · Fixed by #84165
Assignees
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@aliher1911
Copy link
Contributor

aliher1911 commented Jul 11, 2022

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

@aliher1911 aliher1911 added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-kv-replication labels Jul 11, 2022
@aliher1911 aliher1911 self-assigned this Jul 11, 2022
@blathers-crl
Copy link

blathers-crl bot commented Jul 11, 2022

cc @cockroachdb/replication

@blathers-crl blathers-crl bot added the A-kv-replication Relating to Raft, consensus, and coordination. label Jul 11, 2022
@craig craig bot closed this as completed in bef1101 Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant