Cannot drop sets in namespaces



I cannot able to delete set in namespace i follwd this command asinfo -v "set-config:context=namespace;id=aerospike;set=set1;set-delete=true;" java -jar delete-set-1.0.0-jar-with-dependencies.jar -h -p 3000 -s set1 -n aerospike

How to drop sets in right way i amusing storage raw device


That should delete data in the set. After that, you can perform a rolling cold-start across your cluster and the sets should disappear… If the set is empty though, I would just as much leave it there until you do your next maintenance. Are you at some limit? Did it delete your data properly?


Cold restart may bring records back actually. How are you verifying the set is not deleted? Are you referring to elements in the set or the set metadata itself? (For set-delete, you would have to wait for nsup to go through). Also in version 3.12+ you can use the truncate command (but this is durable only in the Enterprise Edition).


I deleted records from the sets there is no limit again records rollbacked there is any way to delete sets permanently alreday I tried this command

asinfo -v “set-config:context=namespace;id=;set=;set-delete=true;”

kindly give the proper solution


Not sure I fully understand the question. Maybe this is what you are looking for?


Did you confirm set was fully deleted? Was a restart performed after the set was deleted and then it came back? We need more details


asinfo -v “…set-delete’’’” must be run on each node. Or run it via asadm -e 'asinfo -v “…” '.

Otherwise use the java set-delete jar per your original post which implements scanAll() to delete each record in the set.

After all records are deleted from the set, you can verify using aql, aql>show sets
look for number of objects in the set, should be zero.

If you coldstart any node, deleted records may come back. (All the “empty” blocks containing deleted records and not yet overwritten by other new data “will” come back.)

Use ver 3.12.1+ Enterprise Edition and use truncate to delete a set if you don’t want deleted records from a set to come back. truncate needs to be issued to only one node in the cluster.

If using asinfo set-delete, (prior to ver 3.12), you cannot durably delete all the records in a set.

Estimating time required to run nsup thread:

grep thr_nsup /var/log/aerospike/aerospike.log and see the total time nsup thread is taking to run. compare that to your nsup-period setting. nsup-period must be greater than sum of all total times for nsup to run, sum for all namespaces, in each node. Once nsup has finished deleting the records in the set, you should not have any records in the set. Validate for each node in the cluster.