Skip to content

Add disable_snapshot_isolation lrl option - #6131

Open
markhannum wants to merge 3 commits into
bloomberg:mainfrom
markhannum:disable-snapshot-isolation
Open

Add disable_snapshot_isolation lrl option#6131
markhannum wants to merge 3 commits into
bloomberg:mainfrom
markhannum:disable-snapshot-isolation

Conversation

@markhannum

Copy link
Copy Markdown
Contributor

Snapshot isolation has been unconditional since gbl_snapisol was 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 option disable_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), and snapisol_enabled_correctly() rejects SNAPSHOT/SERIALIZABLE up front instead of failing later in page reconstruction. gbl_utxnid_log is untouched, so log contents and physrep are unchanged. The tunable is READEARLY (parsed before recovery fills the map) and READONLY (the map can't be rebuilt retroactively).

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>
@markhannum
markhannum force-pushed the disable-snapshot-isolation branch from 59b8cbe to 1fbef50 Compare August 12, 2026 23:30
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>
@markhannum
markhannum force-pushed the disable-snapshot-isolation branch from 1fbef50 to d5379af Compare August 12, 2026 23:35

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants