Lock fingerprint - #6191
Lock fingerprint#6191markhannum wants to merge 2 commits into
Conversation
caabb91 to
80def35
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**
38d6886 to
03f5313
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_truncate [db unavailable at finish]
reco-ddlk-sql **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
03f5313 to
764026f
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_redo [failed with core dumped]
sc_truncate_multiddl_generated [db unavailable at finish] **quarantined**
comdb2sys_queueodh_generated
tsa
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
764026f to
5b31199
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
incoherent_slow [db unavailable at finish] **quarantined**
sc_resume_logicalsc_generated **quarantined**
tsa
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
Stamp the acquiring thread's fingerprint and role (R read, W master write-apply, A replication apply) onto each lock, and report them as comdb2_locks.fingerprint and .fingerprint_role -- NULL when the lock cannot be attributed. Signed-off-by: Mark Hannum <mhannum@bloomberg.net>
Poll comdb2_locks under load for roles R and W, and for A on a replicant in a clustered run, pinning each check's load and poll to the same node. Signed-off-by: Mark Hannum <mhannum@bloomberg.net>
5b31199 to
fe9f7da
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
comdb2sys_queueodh_generated [db unavailable at finish]
sc_resume_logicalsc_generated **quarantined**
tsa
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
locks: attribute each lock to the fingerprint that took it
Feature. This adds two columns to
comdb2_locks,fingerprintandfingerprint_role, stamping each lock at allocation with the acquiring thread's fingerprint and role:Rfor SQL execution,Wfor the master applying a write schedule,Afor a replicant applying from the log.A role is armed unconditionally, so locks are attributable even with
fingerprint_queries,osql_send_fingerprintorlog_fingerprintoff; anything that is not SQL (online-recovery, schema change) reports NULL for both.Arows carry no fingerprint by design — a replicant reads its locks out of the commit record and takes them all up front, before any log record is applied, so there is no per-statement fingerprint in scope at acquisition.The stamp is two TLS reads and a 16-byte copy on the lock-allocation path, and is taken before the wait so a lock parked in
DB_LSTAT_WAITINGis attributed too. It is written once, so a lock re-acquired within a transaction keeps the statement that first took it.struct __db_lockgrows by 16+1 bytes; all region sizing already derives fromsizeof(struct __db_lock).New test
lock_fingerprint.testpollscomdb2_locksunder read and write load for rolesRandW, and forAon a replicant in a clustered run, pinning each check's load and poll to the same node. It also asserts the column contract: role is one ofR/W/Aor NULL, a fingerprint is 32 lowercase hex characters or NULL, and no lock carries a fingerprint without a role.