Transaction concepts and MatrixOne behavior¶
Commit atomically applies accumulated changes; it does not mean every failed statement automatically rolls back the transaction. Ordinary errors normally roll back the failed statement while the transaction can remain open. Deadlocks, lock timeouts and selected connection/state errors can abort it. mo_rollback_txn_on_error=1 makes real statement errors roll back the whole transaction.
Isolation and concurrency modes¶
In v4.2.5 pessimistic mode defaults to RC and optimistic mode to SI, subject to runtime configuration. The MySQL-compatible REPEATABLE-READ string does not establish the engine’s actual strategy. Pessimistic execution acquires locks; optimistic validation uses MVCC/timestamps rather than pessimistic locks at commit.
RC uses the required statement snapshot; SI uses a transaction snapshot. Snapshot selection, commit, Logtail application and object flush are separate events. SI is not identical to every database’s repeatable-read or serializable guarantee.
Durability and retry¶
Small-write commits rely on WAL with later object flush; bulk paths may produce objects before metadata commit. Handle definite failure, transaction abort and unknown commit outcomes separately. Include idempotency keys and external effects in retry design.
See usage, isolation and kernel visibility/errors.