summaryrefslogtreecommitdiff
path: root/db/flush_job_test.cc
diff options
context:
space:
mode:
authoragiardullo <agiardullo@fb.com>2015-05-29 14:36:35 -0700
committeragiardullo <agiardullo@fb.com>2015-05-29 14:36:35 -0700
commitdc9d70de65d20172147759ee97fd1520b8e2d0eb (patch)
tree456dc77ad4238a7e29ab8e3798678fd1a06b678a /db/flush_job_test.cc
parentd5a0c0e69ba42eafa23de1f19f3d53465b90319f (diff)
Optimistic Transactions
Summary: Optimistic transactions supporting begin/commit/rollback semantics. Currently relies on checking the memtable to determine if there are any collisions at commit time. Not yet implemented would be a way of enuring the memtable has some minimum amount of history so that we won't fail to commit when the memtable is empty. You should probably start with transaction.h to get an overview of what is currently supported. Test Plan: Added a new test, but still need to look into stress testing. Reviewers: yhchiang, igor, rven, sdong Reviewed By: sdong Subscribers: adamretter, MarkCallaghan, leveldb, dhruba Differential Revision: https://reviews.facebook.net/D33435
Diffstat (limited to 'db/flush_job_test.cc')
-rw-r--r--db/flush_job_test.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/flush_job_test.cc b/db/flush_job_test.cc
index 0b9a12703..75590ec65 100644
--- a/db/flush_job_test.cc
+++ b/db/flush_job_test.cc
@@ -97,7 +97,8 @@ TEST_F(FlushJobTest, Empty) {
TEST_F(FlushJobTest, NonEmpty) {
JobContext job_context(0);
auto cfd = versions_->GetColumnFamilySet()->GetDefault();
- auto new_mem = cfd->ConstructNewMemtable(*cfd->GetLatestMutableCFOptions());
+ auto new_mem = cfd->ConstructNewMemtable(*cfd->GetLatestMutableCFOptions(),
+ kMaxSequenceNumber);
new_mem->Ref();
std::map<std::string, std::string> inserted_keys;
for (int i = 1; i < 10000; ++i) {