Answer
ClientPolicy timeouts in the Aerospike Java client are client-side timers. A TimeoutException is thrown locally when the client stops waiting for a response. The client does not send a cancellation signal to the Aerospike cluster and the server continues to process the in-flight operation to completion.
There is no mechanism in ClientPolicy or server configuration to discard an in-flight request because the client is no longer listening. The server will finish the operation and persist the result if it succeeds; the client will simply not receive the reply.
Confirmed facts
- The Aerospike Java client timeout is enforced locally by the client I/O layer. It is a read / total wait limit, not a server abort.
- Once a request is on the wire to a node, the node processes it independently of the client socket state. The server has no visibility into the client-side timer expiring.
- ClientPolicy controls how long the client waits, e.g., socketTimeout and totalTimeout, not how long the server is allowed to run.
Likely explanation
For writes, this means the write can succeed on the server after the client has already received a TimeoutException. The client sees a timeout, the server sees a completed operation. Atomicity at the record level is preserved on the server, but the client cannot know the final outcome without a retry or a separate read.
If the client retries the same write after a timeout, duplicate work can occur because the original operation may still be completing. Idempotency must be handled at the application level.
Practical verification for this case
- Enable client logging and capture the TimeoutException with the operation type and key.
- Check server logs for the same operation completing after the client timeout timestamp.
- Perform a subsequent read for the key to determine the final server state.
Assumption: behavior described applies to standard Aerospike Java client request/response operations. Behavior for background operations, queries, and scan jobs can differ.
Uncertainty note: The supplied research brief discusses WCF ClientPolicy and InstanceContext lifecycle, not Aerospike Java Client. No verified Aerospike-specific source evidence is available in the provided data, so the above is a conservative synthesis of well-established client-side timeout semantics.
One missing diagnostic detail that changes the recommendation: which ClientPolicy timeout field is being used, e.g., socketTimeout vs totalTimeout, and whether the operation is a single-record write, batch write, or query. The retry and idempotency guidance depends on that.