Error Code 2: Key not found on PUT when the Bin value is null


#1

Hi,

calling the Put() method with a bin that contain a null item return Error Code 2: Key not found

  1. Is it not possible to store null in a Bin ?
  2. Why it is returning “key not found” ?
  3. Where is the list of C# client error code? “Error Code 2” is just noisy otherwise.

Thanks,

Alex


#2

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?source_topic_id=4741

#3

Many thanks for the clarification.

Alex


#4

C# client return code are located in Main/ResultCode.cs.