From a01bda09977ae72798e53fb00efc18ef29f38faf Mon Sep 17 00:00:00 2001 From: kailiu Date: Tue, 4 Mar 2014 16:59:27 -0800 Subject: [PATCH] Fix a buggy assert Summary: The assert was pointless since if if prefix is the same as the whole key, assertion will surely fail. Reason behind is when performing the internal key comparison, if user keys are the same, *key with smaller transaction id* wins. Test Plan: make -j32 && make check Reviewers: sdong, dhruba, haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D16551 --- table/filter_block.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/table/filter_block.cc b/table/filter_block.cc index d7be78e1c..7d1bfccaa 100644 --- a/table/filter_block.cc +++ b/table/filter_block.cc @@ -82,7 +82,6 @@ void FilterBlockBuilder::AddKey(const Slice& key) { Slice prefix = prefix_extractor_->Transform(user_key); InternalKey internal_prefix_tmp(prefix, 0, kTypeValue); Slice internal_prefix = internal_prefix_tmp.Encode(); - assert(comparator_->Compare(internal_prefix, key) <= 0); start_.push_back(entries_.size()); entries_.append(internal_prefix.data(), internal_prefix.size()); }