Hide
added a comment -
The client should get the following two methods to operate on timeouts:
/**
* Set the number of usec the library should allow an operation to
* be vaild.
*
* Please note that the timeouts are <b>not</b> that accurate,
* because they may be delayed by the application code before it
* drives the event loop.
*
* Please note that timeouts is not stored on a per operation
* base, but on the instance. That means you <b>can't</b> pipeline
* two requests after eachother with different timeout values.
*
* @param instance the instance to set the timeout for
* @param usec the new timeout value.
*/
LIBCOUCHBASE_API
void libcouchbase_set_timeout(libcouchbase_t instance, uint32_t usec);
/**
* Get the current timeout value used by this instance (in usec)
*/
LIBCOUCHBASE_API
uint32_t libcouchbase_get_timeout(libcouchbase_t instance);
The default timeout should be set to a reasonable value (2.5s), allowing for TCP retransmits to happen.
We _might_ want to consider adding internal library stats for the number of timeouts
The user will get the notifications with LIBCOUCHBASE_ETIMEDOUT as the error code for each operation that timed out
Show
added a comment - The client should get the following two methods to operate on timeouts:
/**
* Set the number of usec the library should allow an operation to
* be vaild.
*
* Please note that the timeouts are <b>not</b> that accurate,
* because they may be delayed by the application code before it
* drives the event loop.
*
* Please note that timeouts is not stored on a per operation
* base, but on the instance. That means you <b>can't</b> pipeline
* two requests after eachother with different timeout values.
*
* @param instance the instance to set the timeout for
* @param usec the new timeout value.
*/
LIBCOUCHBASE_API
void libcouchbase_set_timeout(libcouchbase_t instance, uint32_t usec);
/**
* Get the current timeout value used by this instance (in usec)
*/
LIBCOUCHBASE_API
uint32_t libcouchbase_get_timeout(libcouchbase_t instance);
The default timeout should be set to a reasonable value (2.5s), allowing for TCP retransmits to happen.
We _might_ want to consider adding internal library stats for the number of timeouts
The user will get the notifications with LIBCOUCHBASE_ETIMEDOUT as the error code for each operation that timed out