Skip to content

Restrict Cross-Shard Atomic Commit Path to Only Modified Shards #18054

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

Open
harshit-gangal opened this issue Mar 27, 2025 · 0 comments
Open

Restrict Cross-Shard Atomic Commit Path to Only Modified Shards #18054

harshit-gangal opened this issue Mar 27, 2025 · 0 comments
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Milestone

Comments

@harshit-gangal
Copy link
Member

harshit-gangal commented Mar 27, 2025

Description

Currently, VTGate tracks per-shard transaction state in the session to identify if DMLs modified any underlying database. However, during cross-shard transactions, all participating shards (including read-only ones) are part of the atomic commit path.

This task involves:

  • Ensuring that only modified shards are part of the cross-shard commit path using the atomic commit flow.
  • Keeping read-only shards on the direct commit path to prevent unnecessary inclusion in atomic commit operations.

Impact

By restricting the atomic commit path to modified shards only, this change will:

  • Improve efficiency by minimizing the number of shards involved in the two-phase commit.
  • Reduce overhead on read-only shards that do not need atomic commit guarantees.
  • Potentially reduce cross-shard transactions to single-shard ACID if only one shard is modified.

Related

@harshit-gangal harshit-gangal added Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature) labels Mar 27, 2025
@harshit-gangal harshit-gangal added this to the v23.0.0 milestone Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

No branches or pull requests

1 participant