google / leveldb

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
BSD 3-Clause "New" or "Revised" License
36.6k stars 7.83k forks source link

A small question of Corruption_Test #1120

Open yshihao opened 1 year ago

yshihao commented 1 year ago

In the test TableFileIndexData of file corruption_test.cc, i comment the line corruping data. then the check function failed, this is correct because the data are not corrupted. but if i change Value function as following,

image

the strange things happen.The Check functioin only get 9999 correct value and get a bad value.I'm very confusing.

The code of test TableFileIndexData are as following:

image

The result of test TableFileIndexData are as following:

image