From 48c4e4eb48e7994a78bee8f3384df2963a1ea407 Mon Sep 17 00:00:00 2001 From: William Schultz Date: Tue, 28 Nov 2017 16:20:05 -0500 Subject: SERVER-31662 Initialize rollback id to 1 and log when it changes --- src/mongo/db/repl/storage_interface_mock.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mongo/db/repl/storage_interface_mock.cpp') diff --git a/src/mongo/db/repl/storage_interface_mock.cpp b/src/mongo/db/repl/storage_interface_mock.cpp index 01add91bd00..2282c7ca9ac 100644 --- a/src/mongo/db/repl/storage_interface_mock.cpp +++ b/src/mongo/db/repl/storage_interface_mock.cpp @@ -47,7 +47,7 @@ StatusWith StorageInterfaceMock::getRollbackID(OperationContext* opCtx) { return _rbid; } -Status StorageInterfaceMock::initializeRollbackID(OperationContext* opCtx) { +StatusWith StorageInterfaceMock::initializeRollbackID(OperationContext* opCtx) { stdx::lock_guard lock(_mutex); if (_rbidInitialized) { return Status(ErrorCodes::NamespaceExists, "Rollback ID already initialized"); @@ -56,16 +56,16 @@ Status StorageInterfaceMock::initializeRollbackID(OperationContext* opCtx) { // Start the mock RBID at a very high number to differentiate it from uninitialized RBIDs. _rbid = 100; - return Status::OK(); + return _rbid; } -Status StorageInterfaceMock::incrementRollbackID(OperationContext* opCtx) { +StatusWith StorageInterfaceMock::incrementRollbackID(OperationContext* opCtx) { stdx::lock_guard lock(_mutex); if (!_rbidInitialized) { return Status(ErrorCodes::NamespaceNotFound, "Rollback ID not initialized"); } _rbid++; - return Status::OK(); + return _rbid; } void StorageInterfaceMock::setStableTimestamp(ServiceContext* serviceCtx, Timestamp snapshotName) { -- cgit v1.2.1