Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8717

Prevent table-level read locks when minimal locking is enabled

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 3.1.0.Beta1
    • None
    • mysql-connector
    • None

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      When a MySQL connector is configured with 

      "snapshot.locking.mode": "minimal_percona"

      users expect LOCK TABLES FOR BACKUP to be used.
      The desired behaviour is to allow other transactions to continue their work and not block DML (INSERT, UPDATE, DELETE) operations and not require an exclusive metadata lock. The fall back to 'FLUSH TABLE <tableName> WITH READ LOCK' breaks the minimal locking contract.
      In the worst case FLUSH TABLES WITH READ LOCK causes deadlocks due to Metadata Locks conflicts.
      The desired behaviour is to fail the connector and retry after the root cause of failing to acquiring a global lock is addressed. 

      Implementation ideas (optional)

      Throw exception in the table lock fallback path if minimal locking is enabled

              Unassigned Unassigned
              kgalieva Kate Galieva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: