[RocksDB Peformance Branch] A bug in PlainTable format

Summary: A bug to fix. IT's already fixed in D14457, but want to check it in sooner to unblock tests

Test Plan: plain_table_db_test

Reviewers: nkg-, haobo

Reviewed By: nkg-

CC: kailiu, leveldb

Differential Revision: https://reviews.facebook.net/D14673
This commit is contained in:
Siying Dong 2013-12-13 18:20:32 -08:00
parent 2e9efcd6d8
commit 28c24de8be

View File

@ -279,7 +279,7 @@ uint32_t PlainTableReader::GetOffset(const Slice& target,
const char* index_offset = sub_index_.data() + base_offset
+ kOffsetLen * mid;
uint32_t file_offset = DecodeFixed32(index_offset);
mid_key = Slice(file_data_.data() + file_offset, user_key_size_);
mid_key = Slice(file_data_.data() + file_offset, GetInternalKeyLength());
int cmp_result = options_.comparator->Compare(target, mid_key);
if (cmp_result > 0) {