Tag: transaction

  1. Updated

    Locking and MVCC in MySQL InnoDB 鎖機制與多版本並發控制

    Category: Database

    最近在研究 MySQL 5.6 / 5.7 InnoDB storage engine 的 Transaction、Locking 和 Multi-Version Concurrency Control (MVCC) 機制,基本上只討論 Isolation level 是 REPEATABLE READ 或 READ COMMITTED 的情況,這一篇是過程中記錄下來的筆記。

  2. Updated

    Django's get_or_create() may raise IntegrityError but subsequent get() raises DoesNotExist

    Category: Database, Python, Web Development

    get_or_create() 拋出 IntegrityError 但是接著 get() 一次卻會是 DoesNotExist,以上的錯誤常常會發生在 MySQL 的 isolation level 是 REPEATABLE READ 的情況下。MySQL 默認採用 REPEATABLE READ(而 PostgreSQL 預設是 READ COMMITTED)。

  3. Updated

    Transaction isolation levels in MySQL

    Category: Database

    A non-repeatable read occurs, when during the course of a transaction, a row is retrieved twice and the values within the row differ between reads.