-
Notifications
You must be signed in to change notification settings - Fork 4.1k
storage: Refactor GC RPC API #7880
Copy link
Copy link
Closed
Labels
A-kv-clientRelating to the KV client and the KV interface.Relating to the KV client and the KV interface.C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.E-starterMight be suitable for a starter project for new employees or team members.Might be suitable for a starter project for new employees or team members.
Description
The GC method is currently unique in that it is a range request which also contains keys in the body of the GCRequest. The DistSender is unaware of the keys in the body, so if it must split a GC request across ranges both sides get the full list of keys, including those outside their key span. The server side expects this and silently discards any keys that fall outside its span. However, this can mask errors such as the fact that we are unable to GC transaction records created by splits (#7652). It would be better to enforce that a GCRequest never contains keys outside its span.
We could do this in two ways:
- Give DistSender a hook to allow it to partition the keys contained in GCRequest whenever it must truncate the Span.
- Instead of one GCRequest containing a list of keys, replace GCRequest with a single-key GC operation. This makes it more consistent with other operations and allows DistSender to handle it naturally, although it might be somewhat less efficient. We shouldn't undertake this change until after moving to proposer-evaluated KV.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-clientRelating to the KV client and the KV interface.Relating to the KV client and the KV interface.C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.E-starterMight be suitable for a starter project for new employees or team members.Might be suitable for a starter project for new employees or team members.