Skip to content

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

Open
@harshit-gangal

Description

@harshit-gangal

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions