FdbDatabaseOption

Namespace: FoundationDB.Client · enum

Implements: IComparable, ISpanFormattable, IFormattable, IConvertible

Defines a set of options for the database connection

Fields

DataCenterId

DataCenterId = 22

Specify the datacenter ID that was passed to fdbserver processes running in the same datacenter as this client, for better location-aware load balancing.

Parameter: (String) Hexadecimal ID

LocationCacheSize

LocationCacheSize = 10

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.

Parameter: (Int) Max location cache entries

MachineId

MachineId = 21

Specify the machine ID that was passed to fdbserver processes running on the same machine as this client, for better location-aware load balancing.

Parameter: (String) Hexadecimal ID

MaxWatches

MaxWatches = 20

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.

Parameter: (Int) Max outstanding watches

None

None = 0

No option defined

SnapshotReadYourWritesDisable

SnapshotReadYourWritesDisable = 27

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.

SnapshotReadYourWritesEnable

SnapshotReadYourWritesEnable = 26

Snapshot read operations will see the results of writes done in the same transaction. This is the default behavior.

TestCausalReadRisky

TestCausalReadRisky = 900

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.

Parameter: (Int) integer between 0 and 100 expressing the probability a client will verify it can't read stale data

TransactionAutomaticIdempotency

TransactionAutomaticIdempotency = 506

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

TransactionBypassUnreadable = 700

Allows get operations to read from sections of keyspace that have become unreadable because of versionstamp operations. This sets the BypassUnreadable option of each transaction created by this database.

TransactionCausalReadRisky

TransactionCausalReadRisky = 504

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. This sets the CausalReadRisky option of each transaction created by this database.

TransactionIncludePortInAddress

TransactionIncludePortInAddress = 505

Addresses returned by GetAddressesForKeyAsync include the port when enabled. This will be enabled by default in api version 700, and this option will be deprecated.

TransactionLoggingMaxFieldLength

TransactionLoggingMaxFieldLength = 405

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 TransactionLoggingMaxFieldLength option of each transaction created by this database. See the transaction option description for more information.

TransactionMaxRetryDelay

TransactionMaxRetryDelay = 502

Set the maximum amount of backoff delay incurred in the call to onError if the error is retryable. This sets the MaxRetryDelay option of each transaction created by this database. See the transaction option description for more information.

TransactionReportConflictingKeys

TransactionReportConflictingKeys = 702

Enables conflicting key reporting on all transactions, allowing them to retrieve the keys that are conflicting with other transactions.

TransactionRetryLimit

TransactionRetryLimit = 501

Set a maximum number of retries after which additional calls to onError will throw the most recently seen error code. This sets the RetryLimit 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.

TransactionSizeLimit

TransactionSizeLimit = 503

Set the maximum transaction size in bytes. This sets the SizeLimit option on each transaction created by this database. See the transaction option description for more information.

TransactionTimeout

TransactionTimeout = 500

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.

TransactionUsedDuringCommitProtectionDisable

TransactionUsedDuringCommitProtectionDisable = 701

Disable the protection that abort any pending operation on a transaction when at least one of them fails

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.

UseConfigDatabase

UseConfigDatabase = 800

Use configuration database.