Minor tweaks to StringAppend MergeOperator.

Summary:
I'm concerned about a random seg-fault that sometimes occurs when
running stringappend_test. I will investigate further. First, I am removing
stringappend_test from the regular release tests, and making some clean-ups
to the code.

Test Plan:
1. make stringappend_test
2. ./stringappend_test

Reviewers: haobo, dhruba

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D11313
main
Deon Nicholas 12 years ago
parent bff718d81c
commit 8926b72751
  1. 1
      Makefile
  2. 2
      utilities/merge_operators/string_append/stringappend.cc
  3. 2
      utilities/merge_operators/string_append/stringappend_test.cc

@ -62,7 +62,6 @@ TESTS = \
auto_roll_logger_test \ auto_roll_logger_test \
filelock_test \ filelock_test \
merge_test \ merge_test \
stringappend_test \
redis_test redis_test
TOOLS = \ TOOLS = \

@ -43,8 +43,6 @@ void StringAppendOperator::Merge(const Slice& key,
new_value->append(1,delim_); new_value->append(1,delim_);
new_value->append(value.data(), value.size()); new_value->append(value.data(), value.size());
} }
return;
} }
const char* StringAppendOperator::Name() const { const char* StringAppendOperator::Name() const {

@ -77,7 +77,7 @@ class StringLists {
//NotFound is okay; just return empty (similar to std::map) //NotFound is okay; just return empty (similar to std::map)
//But network or db errors, etc, should fail the test (or at least yell) //But network or db errors, etc, should fail the test (or at least yell)
if (s.ToString() != "NotFound: "){ if (!s.IsNotFound()) {
std::cerr << "ERROR " << s.ToString() << std::endl; std::cerr << "ERROR " << s.ToString() << std::endl;
} }

Loading…
Cancel
Save