You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
奏之章
533e47709c
Fix WriteBatchWithIndex with MergeOperator bug (#5577)
Summary:
```
TEST_F(WriteBatchWithIndexTest, TestGetFromBatchAndDBMerge3) {
DB* db;
Options options;
options.create_if_missing = true;
std::string dbname = test::PerThreadDBPath("write_batch_with_index_test");
options.merge_operator = MergeOperators::CreateFromStringId("stringappend");
DestroyDB(dbname, options);
Status s = DB::Open(options, dbname, &db);
assert(s.ok());
ReadOptions read_options;
WriteOptions write_options;
FlushOptions flush_options;
std::string value;
WriteBatchWithIndex batch;
ASSERT_OK(db->Put(write_options, "A", "1"));
ASSERT_OK(db->Flush(flush_options, db->DefaultColumnFamily()));
ASSERT_OK(batch.Merge("A", "2"));
ASSERT_OK(batch.GetFromBatchAndDB(db, read_options, "A", &value));
ASSERT_EQ(value, "1,2");
delete db;
DestroyDB(dbname, options);
}
```
Fix ASSERT in batch.GetFromBatchAndDB()
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5577
Differential Revision: D16379847
fbshipit-source-id: b1320e24ec8e71350c525083cc0a16180a63f752
|
5 years ago |
.. |
write_batch_with_index.cc
|
Fix WriteBatchWithIndex with MergeOperator bug (#5577)
|
5 years ago |
write_batch_with_index_internal.cc
|
Fix WriteBatchWithIndex's SeekForPrev() (#4559)
|
6 years ago |
write_batch_with_index_internal.h
|
Fix WriteBatchWithIndex's SeekForPrev() (#4559)
|
6 years ago |
write_batch_with_index_test.cc
|
Fix WriteBatchWithIndex with MergeOperator bug (#5577)
|
5 years ago |