Table of Contents

Enum OccValidationPolicy

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

When an optimistic transaction checks that the keys it read have not changed, mapped from rocksdb::OccValidationPolicy in utilities/optimistic_transaction_db.h.

public enum OccValidationPolicy

Fields

ValidateParallel = 1

Validate before entering the write group, so transactions validate alongside one another. This is the default.

Each transaction takes locks for its own write set in a fixed order, which keeps the validation off the database mutex. The reason it is the default: mutex contention was the practical limit on commit throughput under ValidateSerial.

ValidateSerial = 0

Validate one transaction at a time, after entering the write group.

Simple, and the cheaper choice when commits are rare. Validation happens single-threaded inside the write group, so under a busy commit path it contends on the database mutex.