#[non_exhaustive]pub enum DatabaseOption {
Show 19 variants
LocationCacheSize(i32),
MaxWatches(i32),
MachineId(String),
DatacenterId(String),
SnapshotRywEnable,
SnapshotRywDisable,
TransactionLoggingMaxFieldLength(i32),
TransactionTimeout(i32),
TransactionRetryLimit(i32),
TransactionMaxRetryDelay(i32),
TransactionSizeLimit(i32),
TransactionCausalReadRisky,
TransactionIncludePortInAddress,
TransactionAutomaticIdempotency,
TransactionBypassUnreadable,
TransactionUsedDuringCommitProtectionDisable,
TransactionReportConflictingKeys,
UseConfigDatabase,
TestCausalReadRisky(i32),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LocationCacheSize(i32)
Max location cache entries
Set the size of the client location cache. Raising this value can boost performance in very large databases where clients access data in a near-random pattern. Defaults to 100000.
MaxWatches(i32)
Max outstanding watches
Set the maximum number of watches allowed to be outstanding on a database connection. Increasing this number could result in increased resource usage. Reducing this number will not cancel any outstanding watches. Defaults to 10000 and cannot be larger than 1000000.
MachineId(String)
Hexadecimal ID
Specify the machine ID that was passed to fdbserver processes running on the same machine as this client, for better location-aware load balancing.
DatacenterId(String)
Hexadecimal ID
Specify the datacenter ID that was passed to fdbserver processes running in the same datacenter as this client, for better location-aware load balancing.
SnapshotRywEnable
Snapshot read operations will see the results of writes done in the same transaction. This is the default behavior.
SnapshotRywDisable
Snapshot read operations will not see the results of writes done in the same transaction. This was the default behavior prior to API version 300.
TransactionLoggingMaxFieldLength(i32)
Maximum length of escaped key and value fields.
Sets the maximum escaped length of key and value fields to be logged to the trace file via the LOG_TRANSACTION option. This sets the transaction_logging_max_field_length
option of each transaction created by this database. See the transaction option description for more information.
TransactionTimeout(i32)
value in milliseconds of timeout
Set a timeout in milliseconds which, when elapsed, will cause each transaction automatically to be cancelled. This sets the timeout
option of each transaction created by this database. See the transaction option description for more information. Using this option requires that the API version is 610 or higher.
TransactionRetryLimit(i32)
number of times to retry
Set a maximum number of retries after which additional calls to onError
will throw the most recently seen error code. This sets the retry_limit
option of each transaction created by this database. See the transaction option description for more information.
TransactionMaxRetryDelay(i32)
value in milliseconds of maximum delay
Set the maximum amount of backoff delay incurred in the call to onError
if the error is retryable. This sets the max_retry_delay
option of each transaction created by this database. See the transaction option description for more information.
TransactionSizeLimit(i32)
value in bytes
Set the maximum transaction size in bytes. This sets the size_limit
option on each transaction created by this database. See the transaction option description for more information.
TransactionCausalReadRisky
The read version will be committed, and usually will be the latest committed, but might not be the latest committed in the event of a simultaneous fault and misbehaving clock.
TransactionIncludePortInAddress
Deprecated. Addresses returned by get_addresses_for_key include the port when enabled. As of api version 630, this option is enabled by default and setting this has no effect.
TransactionAutomaticIdempotency
Set a random idempotency id for all transactions. See the transaction option description for more information. This feature is in development and not ready for general use.
TransactionBypassUnreadable
Allows get
operations to read from sections of keyspace that have become unreadable because of versionstamp operations. This sets the bypass_unreadable
option of each transaction created by this database. See the transaction option description for more information.
TransactionUsedDuringCommitProtectionDisable
By default, operations that are performed on a transaction while it is being committed will not only fail themselves, but they will attempt to fail other in-flight operations (such as the commit) as well. This behavior is intended to help developers discover situations where operations could be unintentionally executed after the transaction has been reset. Setting this option removes that protection, causing only the offending operation to fail.
TransactionReportConflictingKeys
Enables conflicting key reporting on all transactions, allowing them to retrieve the keys that are conflicting with other transactions.
UseConfigDatabase
Use configuration database.
TestCausalReadRisky(i32)
integer between 0 and 100 expressing the probability a client will verify it can’t read stale data
Enables verification of causal read risky by checking whether clients are able to read stale data when they detect a recovery, and logging an error if so.
Implementations§
Source§impl DatabaseOption
impl DatabaseOption
pub fn code(&self) -> FDBDatabaseOption
pub unsafe fn apply(&self, target: *mut FDBDatabase) -> FdbResult<()>
Trait Implementations§
Source§impl Clone for DatabaseOption
impl Clone for DatabaseOption
Source§fn clone(&self) -> DatabaseOption
fn clone(&self) -> DatabaseOption
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more