Detail
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?
Answer
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.
Note:
- 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 1.
- Client error codes are discussed in detail here.