FAQ - What policy is used with an operate command?
An Aerospike operate command may include multiple operations which may or may not modify the contents of the record in question. Which policy is used for these operations?
The answer depends on what is set by the user. If the user sets the policy to use read then the read policy will be used. If the write policy is set then the write policy will be used. If a null policy is set then the operations will be examined. If there are operations that modify the contents of the record then the write policy will be used. If there are no modifying operations (for example
MapGetOperation.GetByKey) then the read policy will be used.
- Aerospike clients will only retry based on policy for network related errors. Server errors such as
FAIL_FORBIDDENwill not be retried.
- Policy specifics can be found in the API documentation. The Java API reference is a good primer and discusses Policy Class.
- Client error codes are discussed in detail here.
OPERATE READ WRITE POLICY