Skip to content

Bug Report: VDiff can hang indefinitely during snapshot initialization waiting for table metadata lock #19392

@mhamza15

Description

@mhamza15

Overview of the Issue

When VDiff initializes a consistent snapshot for table comparison, it issues a LOCK TABLES <table> READ statement. This statement acquires a metadata lock (MDL) on the table. If another session holds a conflicting metadata lock, this statement can block indefinitely.

Reproduction Steps

  1. Set up a MoveTables workflow and let it reach a running/caught-up state.
  2. On the source tablet, open a transaction that touches the table being diffed and leave it open
  3. Start a VDiff
  4. The VDiff enters "initialization" and never progresses.

Binary Version

main

Operating System and Environment details

All

Log Fragments

N/A

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions