Are key-value get timeouts server or client side

Are couchbase key-value get timeouts client side or server side? How are they handled? Do they cancel the request processing on a server or only cancel on the client side (which means that the request is still executing on the server after timeout occurs)?

Specifically, how are the timeouts handled when:

  1. Timeout is set globally on for an environment: com.couchbase.env.timeout.kvTimeout
  2. Timeout is set with GetOptions#timeout for a single request
  3. Timeout is used on Flux or Mono which causes the cancellation to be propagated downstream
1 Like

@moscicky every operation performed with the Java SDK has a client side timeout (i.e. kvTimeout) which purely triggers on the client side. If you set a .timeout() on a flux or mono, this is independent of the mandatory timeout on each operation (so if you do it on an individual op it’s not needed). It can be helpful in more complex situations or where you combine multiple ops and flows etc.

In addition, some operations (i.e. query and some durability KV ops) internally also send a timeout to the server for optimized cancellations, but it doesn’t look different on the client side.

1 Like