google / google/leveldb

A small question of Corruption_Test

Open
#1,120 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Research direction

Start by reading the TableFileIndexData test in corruption_test.cc, including its Check and Value functions, and compare the behavior with and without the corruption line. Reproduce the reported result before determining whether the unexpected value indicates a test issue or a LevelDB defect; the report does not define a specific change or completion condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.