Hi. I am using Aerospike CE 4.7.0.2 for my APIs and I am having troubles with data truncation. I read the documentation and I know that Aerospike needs a cold-restart
in order to actually delete data but this is not happening.
In our API, we use the Go client and according to the codebase, the truncate-namespace
is supported. Despite it is called successfully, the data is actually there and not mutated whatsoever. So I tried to run the truncate-namespace
manually with asinfo
but it’s still not working. I wonder what I am doing wrong.
I also tried to cold-restart the database but nothing seems working. Could you kindly explain why I am having this situation. Here below there are some steps that I’ve taken without success.
$: asinfo -v "truncate-namespace:namespace=test;"
ok
$: aql
Seed: 127.0.0.1
User: None
Config File: /etc/aerospike/astools.conf /root/.aerospike/astools.conf
Aerospike Query Client
Version 3.21.1
C Client Version 4.6.5
Copyright 2012-2019 Aerospike. All rights reserved.
aql> show sets
+------------------+--------+----------------+---------+-------------------+--------------------+-------------------+--------------+------------+
| disable-eviction | ns | set-enable-xdr | objects | stop-writes-count | set | memory_data_bytes | truncate_lut | tombstones |
+------------------+--------+----------------+---------+-------------------+--------------------+-------------------+--------------+------------+
| "false" | "test" | "use-default" | "0" | "0" | "test" | "0" | "0" | "0" |
| "false" | "test" | "use-default" | "0" | "0" | "models" | "0" | "0" | "0" |
| "false" | "test" | "use-default" | "0" | "0" | "testSetName" | "0" | "0" | "0" |
| "false" | "test" | "use-default" | "0" | "0" | "model_1" | "0" | "0" | "0" |
| "false" | "test" | "use-default" | "0" | "0" | "model_2" | "0" | "0" | "0" |
| "false" | "test" | "use-default" | "0" | "0" | "collaborative" | "0" | "0" | "0" |
+------------------+--------+----------------+---------+-------------------+--------------------+-------------------+--------------+------------+
[127.0.0.1:3000] 30 rows in set (0.002 secs)
OK
aql> exit
root@3f40569ae224:/# exit
exit
The configuration looks like the following
# Testing configuration for Aerospike
service {
user root
group root
}
logging {
# Send log messages to stdout
console {
context any info
}
}
network {
service {
address any
port 3000
# Uncomment the following to set the `access-address` parameter to the
# IP address of the Docker host. This will the allow the server to correctly
# publish the address which applications and other nodes in the cluster to
# use when addressing this node.
# access-address <IPADDR>
}
heartbeat {
address any
# mesh is used for environments that do not support multicast
mode mesh
port 3002
# use asinfo -v 'tip:host=<ADDR>;port=3002' to inform cluster of
# other mesh nodes
interval 150
timeout 10
}
fabric {
address any
port 3001
}
info {
address any
port 3003
}
}
namespace phoenix {
replication-factor 1
memory-size 3G
default-ttl 0
storage-engine device {
file /opt/aerospike/data/phoenix.dat
filesize 4G
}
}
namespace test {
replication-factor 1
memory-size 1G
default-ttl 0
storage-engine device {
file /opt/aerospike/data/test.dat
filesize 2G
}
}
I really do not understand what I am doing wrong. I just want to erase the namespace:test
so I can re-run my tests from a clean state. How can I achieve that?
Thank you very much