Fix recovery bug (transaction ID bumping)
Summary: When performing recovery, ensure that the transaction ID in engine is bumped to one after the max tx id seen in recovery. Reviewers: dgleich Reviewed By: dgleich Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1312
This commit is contained in:
@@ -74,3 +74,10 @@ TEST(Engine, RunningTransaction) {
|
||||
EXPECT_NE(t1, engine.RunningTransaction(t0->id_));
|
||||
EXPECT_EQ(t1, engine.RunningTransaction(t1->id_));
|
||||
}
|
||||
|
||||
TEST(Engine, EnsureTxIdGreater) {
|
||||
SingleNodeEngine engine;
|
||||
ASSERT_LE(engine.Begin()->id_, 40);
|
||||
engine.EnsureNextIdGreater(42);
|
||||
EXPECT_EQ(engine.Begin()->id_, 43);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user