From 4b0aa3c4c8b28776633c2553a943a946f86e6335 Mon Sep 17 00:00:00 2001 From: "daoye.ch" Date: Tue, 15 Nov 2016 16:54:36 -0800 Subject: [PATCH] Fix failed compaction_filter_example and add it into make all Summary: Simple patch as title Closes https://github.com/facebook/rocksdb/pull/1512 Differential Revision: D4186994 Pulled By: siying fbshipit-source-id: 880f9b8 --- examples/Makefile | 2 +- examples/compaction_filter_example.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index b04f9a8fba6..573f39305a2 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -10,7 +10,7 @@ endif .PHONY: clean librocksdb -all: simple_example column_families_example compact_files_example c_simple_example optimistic_transaction_example transaction_example +all: simple_example column_families_example compact_files_example c_simple_example optimistic_transaction_example transaction_example compaction_filter_example simple_example: librocksdb simple_example.cc $(CXX) $(CXXFLAGS) $@.cc -o$@ ../librocksdb.a -I../include -O2 -std=c++11 $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) diff --git a/examples/compaction_filter_example.cc b/examples/compaction_filter_example.cc index 77dbd9af76e..8d568a9e329 100644 --- a/examples/compaction_filter_example.cc +++ b/examples/compaction_filter_example.cc @@ -77,7 +77,7 @@ int main() { db->Merge(wopts, "3", "data3"); db->CompactRange(rocksdb::CompactRangeOptions(), nullptr, nullptr); fprintf(stderr, "filter.count_ = %d\n", filter.count_); - assert(filter.count_ == 1); + assert(filter.count_ == 0); fprintf(stderr, "filter.merge_count_ = %d\n", filter.merge_count_); - assert(filter.merge_count_ == 5); + assert(filter.merge_count_ == 6); }