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.
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.