Deadlock - CI/CD用語集の定義
deadlockは、2つのトランザクションがそれぞれ相手の必要とするロックを保持し合い、どちらも進めなくなる状態です。データベースはこのサイクルを検出し、片方のトランザクションをエラーで中断させて、もう片方が続行できるようにします。
CIにおいて
並列のテストjobが同じテーブルに異なる順序でアクセスすると、flakyな失敗に見えるdeadlockが発生することがあります。ロックを一貫した順序で取得し、トランザクションを短く保つことで減らせます。
関連ガイド
Transaction - CI/CD Glossary DefinitionTransaction: A transaction groups one or more statements into a single unit that either fully commits or full…
Pessimistic Locking - CI/CD Glossary DefinitionPessimistic Locking: Pessimistic locking prevents conflicts by locking a row before reading or editing it (fo…
Isolation Level - CI/CD Glossary DefinitionIsolation Level: An isolation level controls how visible one transaction's uncommitted work is to others. The…