Skip to content

Commit a07fa08

Browse files
brad-cater-mongodbMongoDB Bot
authored andcommitted
SERVER-92803 Ignore IndexKeysSpecsConflict error during oplog application to v7.0 (#29143)
GitOrigin-RevId: 5bcbbf02cb9f14b0c193d835ef1b87892fd74f15
1 parent 706c500 commit a07fa08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mongo/db/repl/oplog.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,13 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
10321032
opCtx, applicationMode, swOplogEntry.getValue());
10331033
return Status::OK();
10341034
},
1035+
// These index related error codes needs to be ignored during initial sync because these
1036+
// indexes can already be cloned during initial sync database cloning and the oplogs become
1037+
// no-op. During steady state, since DDL oplogs are applied in serial, we should never see
1038+
// these errors.
10351039
{ErrorCodes::IndexAlreadyExists,
10361040
ErrorCodes::IndexBuildAlreadyInProgress,
1041+
ErrorCodes::IndexKeySpecsConflict,
10371042
ErrorCodes::NamespaceNotFound}}},
10381043
{"commitIndexBuild",
10391044
{[](OperationContext* opCtx, const ApplierOperation& op, OplogApplication::Mode mode)

0 commit comments

Comments
 (0)