-
Notifications
You must be signed in to change notification settings - Fork 475
Description
Exalate commented:
Related PR: cockroachdb/cockroach#107749
Commit: cockroachdb/cockroach@dd65d45
Epic: CRDB-25322
Informs: CRDB-26582
Release note (sql change): Add a new session variable,
enable_durable_locking_for_serializable
, which controls locking
durability under serializable isolation. With this set to true, SELECT
FOR UPDATE locks, SELECT FOR SHARED locks, and constraint check locks
(e.g. locks acquired during foreign key checks if
enable_implicit_fk_locking_for_serializable
is set to true) will be
guaranteed-durable under serializable isolation, meaning they will
always be held to transaction commit. (These locks are always
guaranteed-durable under weaker isolation levels.)
By default, under serializable isolation these locks are best-effort
rather than guaranteed-durable, meaning in some cases (e.g. leaseholder
transfer, node loss, etc.) they could be released before transaction
commit. Serializable isolation does not rely on locking for correctness,
only using it to improve performance under contention, so this default
is a deliberate choice to avoid the performance overhead of lock
replication.
Jira Issue: DOC-8445