Skip to content
Deedboxlatest

DBX040: The transaction's isolation level is not READ COMMITTED

This page explains error DBX040 and how to fix it.

You appended in your own transaction, through UseTransaction or UseDbContext, and that transaction runs at REPEATABLE READ, SERIALIZABLE or SNAPSHOT.

Deedbox orders appends with locks. After a lock is granted, the next statement must see what committed before it. A transaction at one of these levels keeps one snapshot for its whole life. Its append can then read a state from before a lock it waited for: it can pass a check that no longer holds, or apply an inline projection that moved to catch-up. Under load, most such appends also fail in the database with a serialization error.

Open the transaction at READ COMMITTED, the default of Postgres and SQL Server. The stream lock and the expected version still protect each stream from a lost update.