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 = 1Validate 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 = 0Validate 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.