无法从Aerospike中删除logging

我决定尝试aerospike,但我有一些问题。 我在docker里使用aerospike:

companies-data: image: 'aerospike/aerospike-server:3.10.0-1' ports: - '5310:3000' - '5311:3001' - '5312:3002' - '5313:3003' volumes: - './companies-data/data:/opt/aerospike/data' - './companies-data/config:/opt/aerospike/etc' command: '/usr/bin/asd --foreground --config-file /opt/aerospike/etc/aerospike.conf' 

当我创build一个logging,然后重新启动docker容器的数据仍然在那里,所以卷设置正确。 但是,当我删除logging并重新启动docker集装箱,然后logging仍然存在,它不会被删除。 重新启动之前,它工作正常:logging被删除,但是在docker-container重新启动之后,它再次出现。

我正在使用nodejs aerospike客户端。

 let key = new Key(this.ns, this.set, id); client.remove(key, function (err, key) { if (err) { return reject(err); } resolve(key); }); 

这是我的conf:

 service { user root group root paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1. pidfile /var/run/aerospike/asd.pid service-threads 4 transaction-queues 4 transaction-threads-per-queue 4 proto-fd-max 15000 } logging { # Log file must be an absolute path. file /var/log/aerospike/aerospike.log { context any info } # 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 { # 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 { port 3001 } info { port 3003 } } namespace mtm { replication-factor 2 memory-size 1G default-ttl 5d # 5 days, use 0 to never expire/evict. # storage-engine memory # To use file storage backing, comment out the line above and use the # following lines instead. storage-engine device { file /opt/aerospike/data/mtm.dat filesize 4G data-in-memory true # Store data in memory in addition to file. } } 

如何完全删除logging?

删除机制删除数据的索引条目,从而立即释放索引空间和存储空间。 但是,它不会持久地向存储区写入墓碑标记logging,因此,删除的logging可以在集群或networking分区scheme完全冷重新启动的情况下恢复。

这是关于3.10版本的最新的Aerospike Blog Post 。

Aerospike企业版提供的2个function可以解决这个问题:

1-快速启动(索引保存在共享内存中)。 2-持久的删除(见上面提到的博客文章)。

您可以阅读更多关于您在Aerospike论坛上关于此主题的行为。