Namespace Memory gets freed up after Aerospike restart

The primary index should be freed up when you get the evictions / expirations. The secondary index garbage collection happens at a pre-determined interval governed by https://www.aerospike.com/docs/reference/configuration/index.html#sindex-gc-period

if you’re seeing the memory consumed by the secondary, rather than primary index you may be running into the behaviour we document here: