diff options
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/op_observer/op_observer_impl.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog_entry.cpp | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/mongo/db/op_observer/op_observer_impl.cpp b/src/mongo/db/op_observer/op_observer_impl.cpp index b2bf057d5a7..2a9a08e8195 100644 --- a/src/mongo/db/op_observer/op_observer_impl.cpp +++ b/src/mongo/db/op_observer/op_observer_impl.cpp @@ -314,6 +314,8 @@ void logGlobalIndexDDLOperation(OperationContext* opCtx, MutableOplogEntry oplogEntry; oplogEntry.setOpType(repl::OpTypeEnum::kCommand); oplogEntry.setObject(builder.done()); + // The 'ns' field is technically redundant as it can be derived from the uuid, however it's a + // required oplog entry field. oplogEntry.setNss(globalIndexNss.getCommandNS()); oplogEntry.setUuid(globalIndexUUID); diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index ce7b914e8a5..3d7259d73bb 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -1868,8 +1868,8 @@ Status applyOperation_inlock(OperationContext* opCtx, global_index::insertKey(opCtx, *op.getUuid(), - op.getObject().getObjectField("key"), - op.getObject().getObjectField("docKey")); + op.getObject().getObjectField("ik"), + op.getObject().getObjectField("dk")); break; } case OpTypeEnum::kDeleteGlobalIndexKey: { @@ -1877,8 +1877,8 @@ Status applyOperation_inlock(OperationContext* opCtx, global_index::deleteKey(opCtx, *op.getUuid(), - op.getObject().getObjectField("key"), - op.getObject().getObjectField("docKey")); + op.getObject().getObjectField("ik"), + op.getObject().getObjectField("dk")); break; } default: { diff --git a/src/mongo/db/repl/oplog_entry.cpp b/src/mongo/db/repl/oplog_entry.cpp index 0ce5be7ddc9..219dcb5be1c 100644 --- a/src/mongo/db/repl/oplog_entry.cpp +++ b/src/mongo/db/repl/oplog_entry.cpp @@ -131,9 +131,11 @@ ReplOperation makeGlobalIndexCrudOperation(const NamespaceString& indexNss, const BSONObj& key, const BSONObj& docKey) { ReplOperation op; + // The 'ns' field is technically redundant as it can be derived from the uuid, however it's a + // required oplog entry field. op.setNss(indexNss.getCommandNS()); op.setUuid(indexUuid); - op.setObject(BSON("key" << key << "docKey" << docKey)); + op.setObject(BSON("ik" << key << "dk" << docKey)); return op; } } // namespace |