summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer_impl.cpp
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2018-02-25 14:06:11 -0500
committerMaria van Keulen <maria@mongodb.com>2018-03-01 18:30:42 -0500
commitb7b58a38dd34ac09ed56eb1f306ea6d64f8b2d88 (patch)
tree7531b28cce30cf9f888cb530aeb88ac39e6bcc0c /src/mongo/db/op_observer_impl.cpp
parent3891613c64a74f058cd23c530c208142287281bc (diff)
downloadmongo-b7b58a38dd34ac09ed56eb1f306ea6d64f8b2d88.tar.gz
SERVER-32272 Remove 3.4 to 3.6-specific UUID handling
Diffstat (limited to 'src/mongo/db/op_observer_impl.cpp')
-rw-r--r--src/mongo/db/op_observer_impl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp
index 05d6ac0b91c..f8db896ae6a 100644
--- a/src/mongo/db/op_observer_impl.cpp
+++ b/src/mongo/db/op_observer_impl.cpp
@@ -650,7 +650,7 @@ void OpObserverImpl::onCollMod(OperationContext* opCtx,
->logOp(opCtx, "c", cmdNss, cmdObj, nullptr);
// Make sure the UUID values in the Collection metadata, the Collection object, and the UUID
- // catalog are all present and equal if uuid exists and do not exist if uuid does not exist.
+ // catalog are all present and equal.
invariant(opCtx->lockState()->isDbLockedForMode(nss.db(), MODE_X));
Database* db = dbHolder().get(opCtx, nss.db());
// Some unit tests call the op observer on an unregistered Database.
@@ -658,9 +658,9 @@ void OpObserverImpl::onCollMod(OperationContext* opCtx,
return;
}
Collection* coll = db->getCollection(opCtx, nss.ns());
- invariant(coll->uuid() == uuid);
+ invariant(coll->uuid() == uuid && coll->uuid());
CollectionCatalogEntry* entry = coll->getCatalogEntry();
- invariant(entry->isEqualToMetadataUUID(opCtx, uuid));
+ invariant(entry->isEqualToMetadataUUID(opCtx, uuid.get()));
}
void OpObserverImpl::onDropDatabase(OperationContext* opCtx, const std::string& dbName) {
@@ -773,7 +773,7 @@ repl::OpTime OpObserverImpl::onRenameCollection(OperationContext* const opCtx,
builder.append("renameCollection", fromCollection.ns());
builder.append("to", toCollection.ns());
builder.append("stayTemp", stayTemp);
- if (dropTargetUUID && enableCollectionUUIDs && !isMasterSlave(opCtx)) {
+ if (dropTargetUUID && !isMasterSlave(opCtx)) {
dropTargetUUID->appendToBuilder(&builder, "dropTarget");
} else {
builder.append("dropTarget", dropTarget);