我用的是飞机的持久存储。下面是相同的配置。我使用python客户端进行相同的操作,当我使用以下方法删除密钥时:
client.remove(key)数据会被删除。现在,当我重新启动服务器时,数据就回来了。这应该是工作方式还是我做错了什么?
配置文件:
namespace xxx {
replication-factor 2
memory-size 2G
default-ttl 60d # 5 days, use 0 to never expire/evict.
# To use file storage backing, comment out the line above and use the
# following lines instead.
storage-engine device {
file /opt/aerospike/data/xxx.dat
filesize 4G
data-in-memory true # Store data in memory in addition to file.
write-block-size 128K
}
}有同样的办法吗?
发布于 2016-03-03 08:24:45
我在国际航空公司工作,这是解决这种行为的路线图。
这是意料之中的。当发生删除时,对记录的引用将从索引中移除,但是记录本身将保留在写块中,直到用新数据重写该写块为止。当发生冷启动和从磁盘读取数据时,未被重写的块可能已删除正在读取的记录,而系统无法知道这些记录已被删除。这样被删除的数据才能回来。
这里详细讨论了这一点:
https://discuss.aerospike.com/t/expired-deleted-data-reappears-after-server-is-restarted/470
请注意,这是只有当国际航空公司冷启动,在某些情况下,一个温暖的重新启动是可能的,删除的数据将不会再次出现。
https://stackoverflow.com/questions/35766232
复制相似问题