From 28c24de8be0cdb9917fd7832f19d2e6137e789b6 Mon Sep 17 00:00:00 2001 From: Siying Dong Date: Fri, 13 Dec 2013 18:20:32 -0800 Subject: [PATCH] [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 --- table/plain_table_reader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table/plain_table_reader.cc b/table/plain_table_reader.cc index 1562f7cfd..5f68a183a 100644 --- a/table/plain_table_reader.cc +++ b/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 + 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) {