pub struct TransactionDBOptions { /* private fields */ }

Implementations§

Specifies the wait timeout in milliseconds when writing a key outside a transaction (i.e. by calling TransactionDB::put directly).

If 0, no waiting is done if a lock cannot instantly be acquired. If negative, there is no timeout and will block indefinitely when acquiring a lock.

Not using a timeout can lead to deadlocks. Currently, there is no deadlock-detection to recover from a deadlock. While DB writes cannot deadlock with other DB writes, they can deadlock with a transaction. A negative timeout should only be used if all transactions have a small expiration set.

Default: 1000(1s).

Specifies the default wait timeout in milliseconds when a transaction attempts to lock a key if not specified in TransactionOptions.

If 0, no waiting is done if a lock cannot instantly be acquired. If negative, there is no timeout. Not using a timeout is not recommended as it can lead to deadlocks. Currently, there is no deadlock-detection to recover from a deadlock.

Default: 1000(1s).

Specifies the maximum number of keys that can be locked at the same time per column family.

If the number of locked keys is greater than max_num_locks, transaction writes (or get_for_update) will return an error. If this value is not positive, no limit will be enforced.

Default: -1.

Specifies lock table stripes count.

Increasing this value will increase the concurrency by dividing the lock table (per column family) into more sub-tables, each with their own separate mutex.

Default: 16.

Trait Implementations§

Returns the “default value” for a type. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.