Deleting bins by setting values to null


#1

Synopsis

This runbook describe the two cases of deleting bin by setting its value to null.

Solution:

There can be two cases of deleting a bin by setting value to null : Write-update or Write-replace.

Write-Update:

In write-update situation (the default behavior), the previous version of the record will be read in, each bin will be updated with the incoming bin values (null bins will be removed as a result, the database does not store null data), and then the new record is written out again. After that, defragmentation works as usual and claims back the older version of the record.

Write-Replace:

As an aside, if you do not need any bins from the previous version, you can do a write-replace, which will skip “reading the old version”.

For reference please See: http://www.aerospike.com/apidocs/java/com/aerospike/client/policy/RecordExistsAction.html

http://www.aerospike.com/java_api/com/aerospike/client/policy/RecordExistsAction.html