|
|
|
@ -248,7 +248,7 @@ class KeyConvertingIterator : public InternalIterator { |
|
|
|
|
Slice key() const override { |
|
|
|
|
assert(Valid()); |
|
|
|
|
ParsedInternalKey parsed_key; |
|
|
|
|
if (!ParseInternalKey(iter_->key(), &parsed_key)) { |
|
|
|
|
if (ParseInternalKey(iter_->key(), &parsed_key) != Status::OK()) { |
|
|
|
|
status_ = Status::Corruption("malformed internal key"); |
|
|
|
|
return Slice("corrupted key"); |
|
|
|
|
} |
|
|
|
@ -1552,7 +1552,7 @@ TEST_P(BlockBasedTableTest, RangeDelBlock) { |
|
|
|
|
for (size_t i = 0; i < expected_tombstones.size(); i++) { |
|
|
|
|
ASSERT_TRUE(iter->Valid()); |
|
|
|
|
ParsedInternalKey parsed_key; |
|
|
|
|
ASSERT_TRUE(ParseInternalKey(iter->key(), &parsed_key)); |
|
|
|
|
ASSERT_OK(ParseInternalKey(iter->key(), &parsed_key)); |
|
|
|
|
RangeTombstone t(parsed_key, iter->value()); |
|
|
|
|
const auto& expected_t = expected_tombstones[i]; |
|
|
|
|
ASSERT_EQ(t.start_key_, expected_t.start_key_); |
|
|
|
@ -4102,7 +4102,7 @@ TEST_P(BlockBasedTableTest, DISABLED_TableWithGlobalSeqno) { |
|
|
|
|
char current_c = 'a'; |
|
|
|
|
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { |
|
|
|
|
ParsedInternalKey pik; |
|
|
|
|
ASSERT_TRUE(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
ASSERT_OK(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
|
|
|
|
|
ASSERT_EQ(pik.type, ValueType::kTypeValue); |
|
|
|
|
ASSERT_EQ(pik.sequence, 0); |
|
|
|
@ -4123,7 +4123,7 @@ TEST_P(BlockBasedTableTest, DISABLED_TableWithGlobalSeqno) { |
|
|
|
|
current_c = 'a'; |
|
|
|
|
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { |
|
|
|
|
ParsedInternalKey pik; |
|
|
|
|
ASSERT_TRUE(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
ASSERT_OK(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
|
|
|
|
|
ASSERT_EQ(pik.type, ValueType::kTypeValue); |
|
|
|
|
ASSERT_EQ(pik.sequence, 10); |
|
|
|
@ -4141,7 +4141,7 @@ TEST_P(BlockBasedTableTest, DISABLED_TableWithGlobalSeqno) { |
|
|
|
|
ASSERT_TRUE(iter->Valid()); |
|
|
|
|
|
|
|
|
|
ParsedInternalKey pik; |
|
|
|
|
ASSERT_TRUE(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
ASSERT_OK(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
|
|
|
|
|
ASSERT_EQ(pik.type, ValueType::kTypeValue); |
|
|
|
|
ASSERT_EQ(pik.sequence, 10); |
|
|
|
@ -4160,7 +4160,7 @@ TEST_P(BlockBasedTableTest, DISABLED_TableWithGlobalSeqno) { |
|
|
|
|
current_c = 'a'; |
|
|
|
|
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { |
|
|
|
|
ParsedInternalKey pik; |
|
|
|
|
ASSERT_TRUE(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
ASSERT_OK(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
|
|
|
|
|
ASSERT_EQ(pik.type, ValueType::kTypeValue); |
|
|
|
|
ASSERT_EQ(pik.sequence, 3); |
|
|
|
@ -4179,7 +4179,7 @@ TEST_P(BlockBasedTableTest, DISABLED_TableWithGlobalSeqno) { |
|
|
|
|
ASSERT_TRUE(iter->Valid()); |
|
|
|
|
|
|
|
|
|
ParsedInternalKey pik; |
|
|
|
|
ASSERT_TRUE(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
ASSERT_OK(ParseInternalKey(iter->key(), &pik)); |
|
|
|
|
|
|
|
|
|
ASSERT_EQ(pik.type, ValueType::kTypeValue); |
|
|
|
|
ASSERT_EQ(pik.sequence, 3); |
|
|
|
|