2016-03-03 84 views
3

我正在使用針對Aerospike的永久存儲器。下面是相同的配置。我使用python客戶端時,我刪除使用的密鑰:刪除記錄不適用於Aerospike永久存儲器

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 
    } 

} 

有一個變通的一樣嗎?

回答

4

我在Aerospike工作,它在解決此問題的路線圖上。

這是預期的。發生刪除時,對索引的引用將從索引中刪除,但記錄本身保留在寫入塊中,直到該寫入塊被新數據重寫爲止。當發生冷啓動並且從磁盤讀取數據時,未被重寫的塊可能已經刪除了被讀取的記錄,並且系統無法知道這些記錄被刪除。所以刪除的數據可以回來。

這將在這裏詳細討論:

https://discuss.aerospike.com/t/expired-deleted-data-reappears-after-server-is-restarted/470

請注意,這只是塞式時,冷啓動,在某些情況下,熱啓動是可能的,刪除的數據不會再出現。