Class TableLock

java.lang.Object
dev.frostlake.transaction.TableLock

public class TableLock extends Object
One table-level lock a transaction is HOLDING, as SHOW LOCKS reports it (live-verified): partition-rewriting DML — UPDATE, DELETE (even one matching no rows), MERGE, TRUNCATE — registers a PARTITIONS lock on the table's fully qualified name, one row per (transaction, table) however many statements touch it, released when the transaction ends. An append-only INSERT holds no lock. acquiredOn is the FIRST touch; queryId is the query that acquired it.
  • Constructor Details

    • TableLock

      public TableLock(long acquiredOn, String queryId)
  • Method Details

    • getAcquiredOn

      public long getAcquiredOn()
      Epoch millis of the first statement that touched the table in this transaction.
    • getQueryId

      public String getQueryId()
      The id of the query that acquired the lock.