Tencent / Tendis

Tendis is a high-performance distributed storage system fully compatible with the Redis protocol.
http://tendis.cn
Other
2.87k stars 317 forks source link

When enabled RocksDB's blob_db support, non-blob key could be lost randomly #230

Open leonliao opened 1 year ago

leonliao commented 1 year ago

Description

When rocks.enable_blob_files is enabled, non-blob key could be gone randomly, either before TTL reached or no TTL is set at all.

Expected Behavior

Keys with TTL must be present before TTL reaches. Keys without TTL must be present before the user explicitly deletes them.

Current Behavior

Keys(only non-blob key) are gone randomly.

Possible Solution

Related to https://github.com/facebook/rocksdb/pull/10391

Steps to Reproduce (for bugs)

  1. Insert a key(named KEYA) without TTL, and value size < min_blob_size
  2. At the same time, using redis-benchmark to set keys with value size greater than min_blob_size
  3. invoke reshape to trigger RocksDB to compact

Will find out the KEYA will be gone.

Context

Your Environment

Tendis 2.5.0

takenliu commented 1 year ago

好,谢谢反馈,我们考虑下解决方法~

takenliu commented 5 months ago

这是rocksdb早期版本的一个bug,tendis2.7.0版本将rocksdb升级到了8.5.3版本,从而解决了这个问题。感谢leon的建议~