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

kvserver: go through DB for GC #143124

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

tbg
Copy link
Member

@tbg tbg commented Mar 19, 2025

Instead of doing a bespoke thing that hands requests to the replica directly
and bypasses a lot of plumbing, go through the DB. This means GCRequest enters
the Replica like every other request, after passing through the DistSender
stack and being routed through the Node.

This avoids surprises such as discovered in #143122.

Epic: none
Release note: None

Instead of doing a bespoke thing that hands requests to the replica directly
and bypasses a lot of plumbing, go through the DB. This means GCRequest enters
the Replica like every other request, after passing through the DistSender
stack and being routed through the Node.

This avoids surprises such as discovered in cockroachdb#143122.

Epic: none
Release note: None
Copy link

blathers-crl bot commented Mar 19, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained


pkg/kv/kvserver/mvcc_gc_queue.go line 603 at r1 (raw file):

	var b kv.Batch
	b.AddRawRequest(&req)

Is this sufficient to initialize all the fields in kv.Batch. For example, we were ad-hoc specifying a RangeID and only initializing part of the ReplicaDescriptor. Presumably all of that will now be computed inside DB.Run, though I can't spot where that happens.

Also, we need to specify the AdmissionHeader too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants