Aerospike::put with empty array of bins


#1

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


#2

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?


#3

Done https://github.com/aerospike/aerospike-client-php/issues/54

thank you, Rolando


#4

Those always help. :+1:


#5

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