Isolation Level - CI/CD用語集の定義
isolation levelは、あるトランザクションの未コミットの作業が他のトランザクションからどれだけ見えるかを制御します。SQL標準では、弱い順にRead Uncommitted、Read Committed、Repeatable Read、Serializableが定義されています。
トレードオフ
分離レベルを高くするとdirty readやphantom readのような異常は防げますが、ロックが増え、競合の可能性も高まります。ある水準を前提としたテストは、CIのデータベースがデフォルトで別の水準だとflakyになることがあります。
関連ガイド
Transaction - CI/CD Glossary DefinitionTransaction: A transaction groups one or more statements into a single unit that either fully commits or full…
ACID - CI/CD Glossary DefinitionACID: ACID is the set of guarantees a transactional database provides: Atomicity (all-or-nothing), Consistenc…
Deadlock - CI/CD Glossary DefinitionDeadlock: A deadlock occurs when two transactions each hold a lock the other needs, so neither can proceed. T…