OptimisticTransactionDB will allocate 1M mutexes when opening the db by default. This will consume ~114 MiB memory according to our tests. This can be a waste of memory if most transactions are small. This number can be adjusted by OptimisticTransactionDBOptions.
Actual behavior
However, OptimisticTransactionDBOptions is not exposed in C API, unlike TransactionDBOptions:
Expected behavior
OptimisticTransactionDB
will allocate 1M mutexes when opening the db by default. This will consume ~114 MiB memory according to our tests. This can be a waste of memory if most transactions are small. This number can be adjusted byOptimisticTransactionDBOptions
.Actual behavior
However,
OptimisticTransactionDBOptions
is not exposed in C API, unlikeTransactionDBOptions
:https://github.com/facebook/rocksdb/blob/793a786fa3c16a2be782024446bd3f8bb5162875/include/rocksdb/c.h#L2744-L2753
https://github.com/facebook/rocksdb/blob/793a786fa3c16a2be782024446bd3f8bb5162875/include/rocksdb/c.h#L2459-L2470
This issue also makes #11439 to be unusable for other languages.