Found existence of deleted and expired records in Aerospike!



Installed new version of aerospike 3.4 community edition and created a namespace with configuration,

namespace users{
    replication-factor 1
    memory-size 2G
    default-ttl 0 # 24 Hours, use 0 to never expire/evict.
    high-water-memory-pct 60
    high-water-disk-pct 50
    stop-writes-pct 90

    storage-engine device {
                   file /opt/aerospike/data/users.dat
                    filesize 8G
                    data-in-memory true

And, inserted some data into it. But later deleted some of the records from the Set. To add one more namespace, restarted the aerospike. But found that the deleted records existing in aerospike.

To resolve this issue, also tried using different defrag type variables which are mentioned in this question. And the values that used for the namespace are,

defrag-lwm-pct 100

Some records got deleted rather deleting the whole records which are told by aerospike client.

Finally, What can we do to delete whole records when they are marked as deleted?


Deletes will remove the reference in memory but actual record will still exist on disk until it is overwritten. a cold start ( restart on the community edition) will force index to be rebuilt from disk.

Please see the following:

If you have a cluster of nodes with at least replication factor>=2 you may be able to use this option to ensure that the restarted node is re-indexed from its peer after data is replicated.


so extending the topic,

is there a way to determine how many of the

  1. record indexes are deleted
  2. records relevant space has been reclaimed by the defrag

please help me with 3.7 & 3.9

It is important in my case because, I have zombie records and I suspect this is because, I rebooted the system before allowing the defrag to claim the space for the indexes deleted



No, there isn’t a way to determine the information you are requesting.


Thanks Kporter

So what is the best way to avoid such situations in future



In the near future there will be a solution for use cases requiring deletes. However, any such solution will likely incur some penalties (storage/performance costs), the best solutions will remain those that use expiration/eviction exclusively.

Record deletions while migrations are taking place

Aerospike 3.10.0 introduces durable deletes for Aerospike Enterprise. Learn more about how they work here:


Since durable deletes is only available in the Enterprise edition, what is the proposed solution to this in the Community edition?

Thanks. Deepak.