# Found existence of deleted and expired records in Aerospike!

**URL:** <https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486>\
**Category:** Deletion\
**Tags:** deletion, durable-deletion\
**Created:** [July 14, 2015, 6:19am UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486 "2015-07-14T06:19:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shiva\_Kumar](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shiva\_Kumar](https://discuss.aerospike.com/u/Shiva_Kumar)\
**Post date:** [July 14, 2015, 6:19am UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486/1 "2015-07-14T06:19:09Z")

</div>

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](https://discuss.aerospike.com/t/expired-deleted-data-reappears-after-server-restarted/470). 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?

---

<div class="post-metadata">

**Author:** ![lucien](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/lucien/32/2065_2.png) [@lucien](https://discuss.aerospike.com/u/lucien)\
**Post date:** [July 17, 2015, 12:25am UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486/2 "2015-07-17T00:25:01Z")

</div>

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:

> [@How to ensure that deleted data from set does not come back?](https://discuss.aerospike.com/t/how-to-ensure-that-deleted-data-from-set-does-not-come-back/1306):
>
> Hello. After restart of the server, ‘zombie-records’ could appear due to the fact that we’ve deleted the whole set for example. How could we figure out if all of the records that are scheduled for deletion are erased from the SSD? Aerospike 3.3.21

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.

[http://www.aerospike.com/docs/reference/configuration/#cold-start-empty](http://www.aerospike.com/docs/reference/configuration/#cold-start-empty)

---

<div class="post-metadata">

**Author:** ![AJVee](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJVee](https://discuss.aerospike.com/u/AJVee)\
**Post date:** [September 19, 2016, 9:20pm UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486/3 "2016-09-19T21:20:51Z")

</div>

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

Thanks

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [September 20, 2016, 10:08am UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486/4 "2016-09-20T10:08:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AJVee](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJVee](https://discuss.aerospike.com/u/AJVee)\
**Post date:** [September 20, 2016, 2:34pm UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486/5 "2016-09-20T14:34:22Z")

</div>

Thanks Kporter

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

Regards

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [September 26, 2016, 6:07pm UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486/6 "2016-09-26T18:07:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [October 11, 2016, 7:08pm UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486/7 "2016-10-11T19:08:59Z")

</div>

Aerospike 3.10.0 introduces [durable deletes](http://www.aerospike.com/docs/guide/durable_deletes.html) for Aerospike Enterprise. Learn more about how they work here: [www.aerospike.com/docs/guide/durable\_deletes.html](http://www.aerospike.com/docs/guide/durable_deletes.html).

---

<div class="post-metadata">

**Author:** ![deepakp](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/deepakp/32/427_2.png) [@deepakp](https://discuss.aerospike.com/u/deepakp)\
**Post date:** [December 29, 2016, 10:34am UTC](https://discuss.aerospike.com/t/found-existence-of-deleted-and-expired-records-in-aerospike/1486/8 "2016-12-29T10:34:02Z")

</div>

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

Thanks. Deepak.
