How do timeouts work in the C API?

#1

When the database is not available, the client will wait forever without a timeout. Specifically in fdb_future_block_until_ready(). It also seems that there is no mention of timeouts in the API documentation.

How can I set a timeout for an operation in the C API?

(Ryan Worl) #2

The timeout can be set at the transaction level using fdb_transaction_set_option(). Your future will fail (and return) when the transaction times out and the fdb_future_block_until_ready() API says you must check if the call resulted in an error every time regardless.

1 Like