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
This commit is contained in:
Deon Nicholas 2013-06-14 16:44:39 -07:00
parent bff718d81c
commit 8926b72751
3 changed files with 2 additions and 5 deletions

View File

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

View File

@ -16,7 +16,7 @@
namespace leveldb {
// Constructor: also specify the delimiter character.
// Constructor: also specify the delimiter character.
StringAppendOperator::StringAppendOperator(char delim_char)
: delim_(delim_char) {
}
@ -43,8 +43,6 @@ void StringAppendOperator::Merge(const Slice& key,
new_value->append(1,delim_);
new_value->append(value.data(), value.size());
}
return;
}
const char* StringAppendOperator::Name() const {

View File

@ -77,7 +77,7 @@ class StringLists {
//NotFound is okay; just return empty (similar to std::map)
//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;
}