summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/storage_interface_impl.cpp
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-01-24 13:45:05 -0500
committerDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-01-24 13:45:05 -0500
commitfbf03e93dad1d2d081944c05436e777380873eb2 (patch)
tree8e2bd0d16febafcc10c0a201094967efb876c61b /src/mongo/db/repl/storage_interface_impl.cpp
parente59b03c06a034bac37435dbcdb2b631babe0f055 (diff)
downloadmongo-fbf03e93dad1d2d081944c05436e777380873eb2.tar.gz
SERVER-32251: Timestamp drop collection/database
Diffstat (limited to 'src/mongo/db/repl/storage_interface_impl.cpp')
-rw-r--r--src/mongo/db/repl/storage_interface_impl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/repl/storage_interface_impl.cpp b/src/mongo/db/repl/storage_interface_impl.cpp
index 6a5841bb3b1..7657dae752b 100644
--- a/src/mongo/db/repl/storage_interface_impl.cpp
+++ b/src/mongo/db/repl/storage_interface_impl.cpp
@@ -61,6 +61,7 @@
#include "mongo/db/exec/update.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/keypattern.h"
+#include "mongo/db/logical_clock.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/ops/delete_request.h"
#include "mongo/db/ops/parsed_update.h"
@@ -429,6 +430,10 @@ Status StorageInterfaceImpl::dropCollection(OperationContext* opCtx, const Names
if (!status.isOK()) {
return status;
}
+ if (nss.isDropPendingNamespace() && !opCtx->writesAreReplicated()) {
+ Timestamp ts = LogicalClock::get(opCtx)->getClusterTime().asTimestamp();
+ fassertStatusOK(50661, opCtx->recoveryUnit()->setTimestamp(ts));
+ }
wunit.commit();
return Status::OK();
});