Aerospike::put with empty array of bins

Hi,

IF (Aerospike::put ($key, ) returns Aerospike::OK) why Aerospike::get($key, $record) returns AEROSPIKE_ERR_RECORD_NOT_FOUND

Will not be better to return an error status for Aerospike::put?

thank you Rolando

Aerospike Server 3.6.1 - PHP Client 3.4.1 - PHP 5.3.10

Mainly your put never happened because you don’t have any data for the record, so none was created. Therefore the get() doesn’t find any record, because it really does not exist.

The main problem is that the failed put() is returning a status of Aerospike::OK, which is not right. Can you open a new issue on the PHP client’s GitHub repo?

Done

thank you, Rolando

Those always help. :+1:

Hey Rolando, this is fixed in release 3.4.4. Thanks for reporting the problem.

1 Like