RecordExistsAction.REPLACE for operations other than PUT

One of the Java client Best Practices bullets says it is better to replace records rather than update them, the example given is for the PUT operation. I was wondering if this advice also holds for operations such as ADD and operations that require reading a bin beforehand.


Hi @beck-daniel,

REPLACE flag in WritePolicy will not work with ADD operation. ADD is considered as ‘modify’ operation and requires previous value of the bin. Have you tried it? It should return error code 4 i.e AS_PROTO_RESULT_FAIL_PARAMETER.

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.