alex75
November 8, 2017, 9:35am
1
Hi,
calling the Put() method with a bin that contain a null item return
Error Code 2: Key not found
Is it not possible to store null in a Bin ?
Why it is returning “key not found” ?
Where is the list of C# client error code? “Error Code 2” is just noisy otherwise.
Thanks,
Alex
No, storing null in a Bin deletes the bin, the record is also deleted when it’s bin count reaches 0.
You are effectively issuing a delete to a non-existent record.
Not sure if they are defined (@Brian ?), a list of server error codes can be found here:
https://discuss.aerospike.com/t/aerospike-error-codes/3835
alex75
November 8, 2017, 4:01pm
3
Many thanks for the clarification.
Alex
Brian
November 8, 2017, 5:40pm
4
C# client return code are located in Main/ResultCode.cs.
How to avoid this, is there any policy exists
kporter
September 17, 2018, 9:36am
6
Any deletes to a non-existent record will result in a not-found result code. If this is expected for the operation then you should handle this result similar/same as a success.