Drop a namespace quickly

We are running YCSB benchmarks on aerospike community edition 3.9.1. We build up our namespace called “ycsb” and we generally want to run different tests so we want to drop our namespace and start over.

here are our steps:

  1. We want to mark the namespace as delete capable with this command.

    $ asinfo -v "set-config:context=namespace;id=ycsb;set=usertable;set-delete=true;"
    
  2. we go into aql and see that the set is ready for delete with a “SHOW SETS” command

    +------------------+--------+----------------+----------+-------------------+-------------+-------------------+----------+
    | disable-eviction | ns     | set-enable-xdr | objects  | stop-writes-count | set         | memory_data_bytes | deleting |
    +------------------+--------+----------------+----------+-------------------+-------------+-------------------+----------+
    | "false"          | "ycsb" | "use-default"  | 26629823 | 0                 | "usertable" | 0                 | "true"   |
    +------------------+--------+----------------+----------+-------------------+-------------+-------------------+----------+
    
  3. Then we try

    aql> DROP ycsb
    

    or

    aql> DROP NAMESPACE ycsb
    

    or

    aql> DELETE FROM "ycsb"
    

    which generates a seg fault / core dump of aql

But these don’t really work, we see that the data does start getting dropped by monitoring info in asadm, but this is all too painful.

Any good ideas, besides just “dd” 'ing the drive in between runs?

Thanks!

1 Like

Namespaces cannot be dynamically added or removed.

The ability to add/remove namespaces with rolling restart of the cluster is added starting server version 3.13.0.1 for both Community and Enterprise versions on paxos-protocol version v5.

[AER-3485] - (KVS) Support adding/removing namespaces with rolling restart. http://www.aerospike.com/download/server/notes.html#3.13.0.1