rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

Call the db->get() API, but the value returned has already been deleted

Open yangzhijia opened this issue 7 years ago • 2 comments

Rocksdb version: 5.10.4

Question

In our environment,

  1. we put some kv into rocksdb (k1->v1) (k2->v2) ……
  2. use rocksdb::WriteBatch to delete k1 k2, and call db->Write()
  3. delete range()
  4. compact range()
  5. db->get() k1 k2

The value returned is v1 v2

I dumped all sst files with hex format , and found that the key was in 518249.sst

./sst_dump --file=518249.sst --command=scan --output_hex

image

In the above figure, the key(016972F81A75BE746473630000000000000000, 016975F81A75BE726473630000000000000000) has been deleted. But when we use the ldb tools to get the key, we get the old value. image image

@ajkr @abhimadan

yangzhijia avatar Jan 08 '19 11:01 yangzhijia

Delete Range improved significantly over the last few months. Are you able to reproduce this issue with the latest version of RocksDB, 5.17.2 ?

sagar0 avatar Jan 08 '19 22:01 sagar0

We use rocksdb as the local storage in our production environment. The lastest version of rocksdb has not been used so far. Is there any bugs with Delete Range which causes the above problems?

yangzhijia avatar Jan 09 '19 02:01 yangzhijia