You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
opt: do not use LockDurabilityGuaranteed under serializable isolation
This is a follow-up from cockroachdb#103734.
We do not want to use guaranteed-durable (a.k.a. replicated) locking
under serializable isolation, because it prevents pipelining and other
optimizations, and is unnecessary for correctness. This commit ammends
8cbc6d1 to only set durability for
`SELECT FOR UPDATE` locking under weaker isolation levels.
This means that query plans will be slightly different under different
isolation levels, and so we must add isolation level to the optimizer
memo staleness calculation.
Furthermore, this commit changes the error message added by
e633d5e to be about guaranteed-durable
locking rather than `SELECT FOR UPDATE`, because in a later commit this
specific error will also be triggered by foreign key checks under weaker
isolation levels.
Informs: cockroachdb#100144, cockroachdb#100156, cockroachdb#100193, cockroachdb#100194
Release note: None
0 commit comments