My project uses aerospike-client-go/v5 and I implemented a helper function Create that invokes client’s Put with CREATE_ONLY as RecordExistsAction in the WritePolicy.
But, surprisingly, sometimes I get the KEY_NOT_FOUND_ERROR. Is that something expected to happen?
Ah, I’ve just learned that the bin was empty and when that happens Aerospike understands it as a delete and it was trying to delete a record that did not exist. therefore the not found error.