-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kv: pipeline DeleteRange requests where possible #64723
Copy link
Copy link
Closed
Labels
A-kv-transactionsRelating to MVCC and the transactional model.Relating to MVCC and the transactional model.C-performancePerf of queries or internals. Solution not expected to change functional behavior.Perf of queries or internals. Solution not expected to change functional behavior.O-communityOriginated from the communityOriginated from the communityT-kvKV TeamKV Teambranch-release-24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
Metadata
Metadata
Assignees
Labels
A-kv-transactionsRelating to MVCC and the transactional model.Relating to MVCC and the transactional model.C-performancePerf of queries or internals. Solution not expected to change functional behavior.Perf of queries or internals. Solution not expected to change functional behavior.O-communityOriginated from the communityOriginated from the communityT-kvKV TeamKV Teambranch-release-24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
Sorry if this is intended and I've just missed why, but in a bit of testing recently I noticed that while transactional pipelining of INSERTs/UPSERTs works great (i.e. they return almost instantly when run within a transaction), it doesn't appear to work for DELETEs (i.e. they have to wait for a full replication round trip).
I noticed this on a cluster running v20.2.7 with roughly 30ms RTT between localities in the cluster.
@nvanbenschoten is this expected? Sorry if it's a dupe or I'm way off base here, but it's surprising to me that inserts/upserts can be pipelined but not deletes.
Reproduction
Create a simple table:
Single inserts, upserts, and deletes all take around 30ms, corresponding with the network latency between localities:
Within a transaction, inserts and upserts finish basically immediately, as I'd expect due to transactional pipelining:
However, delete statements don't appear to benefit from this optimization:
Jira issue: CRDB-7218