Add disable_snapshot_isolation lrl option - #6131
Conversation
Every node maintains the commit-LSN (utxnid) map - one entry per committed transaction - even if it never serves a snapshot query. Add gbl_snapshot_isolation (default on); turning it off skips populating the map and rejects SNAPSHOT/SERIALIZABLE up front. gbl_utxnid_log is untouched, so log contents and physrep are unchanged. Signed-off-by: Mark Hannum <mhannum@bloomberg.net>
59b8cbe to
1fbef50
Compare
The switch fell through from LLMETA_ROWLOCKS_ENABLED into LLMETA_ROWLOCKS_DISABLED, so it always cleared gbl_rowlocks. It is also redundant: backend_open_tran(), called a few lines later, applies the same llmeta state correctly. Adding the missing break would instead leave gbl_sql_tranlevel_default as snapisol before that call, clobbering gbl_sql_tranlevel_preserved, so drop the block and let backend_open_tran own it. Signed-off-by: Mark Hannum <mhannum@bloomberg.net>
Verifies that snapshot transactions are rejected and that the commit-lsn map stays empty on every node, while default-isolation reads and writes are unaffected. Signed-off-by: Mark Hannum <mhannum@bloomberg.net>
1fbef50 to
d5379af
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
cdb2jdbc
reco-ddlk-sql **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
tunables
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:
cdb2jdbc
consumer_non_atomic_default_consumer_generated **quarantined**
tunables
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [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:
cdb2jdbc
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
cdb2jdbc
reco-ddlk-sql **quarantined**
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
truncatesc_offline_generated [timeout] **quarantined**
Snapshot isolation has been unconditional since
gbl_snapisolwas removed, so every node maintains the commit-LSN (utxnid) map — one entry per committed transaction, held until the log file holding the commit is deleted. Nodes that never serve a snapshot query, physical replicants especially, pay for a hash they never read.Adds
gbl_snapshot_isolation(default on) with the lrl optiondisable_snapshot_isolation. When off,__txn_commit_map_enabled()gates every site that populates the map (master commit, replicant/physrep apply, recovery, prepared-txn recovery, log prune), andsnapisol_enabled_correctly()rejects SNAPSHOT/SERIALIZABLE up front instead of failing later in page reconstruction.gbl_utxnid_logis untouched, so log contents and physrep are unchanged. The tunable isREADEARLY(parsed before recovery fills the map) andREADONLY(the map can't be rebuilt retroactively).