RecordExistsAction.REPLACE for operations other than PUT


#1

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.

Thanks!


#2

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.


closed #3

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