[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
main
Siying Dong 11 years ago
parent 2e9efcd6d8
commit 28c24de8be
  1. 2
      table/plain_table_reader.cc

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

Loading…
Cancel
Save