diff options
author | Sophia Tan <sophia_tll@hotmail.com> | 2023-05-12 19:44:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-15 23:20:28 +0000 |
commit | 6be86d8987dbad1c33160ef1779b598bc7cfa6b4 (patch) | |
tree | b3484e6c70e402ddf66482df828c3b3f221457b3 /src/mongo/db/catalog/index_repair.cpp | |
parent | ba0986ac66e3a22d211ad3707ad037fdc10910af (diff) | |
download | mongo-6be86d8987dbad1c33160ef1779b598bc7cfa6b4.tar.gz |
SERVER-75276 writeConflictRetry should properly be using a NamespaceStringOrUUID instead of a StringData
Diffstat (limited to 'src/mongo/db/catalog/index_repair.cpp')
-rw-r--r-- | src/mongo/db/catalog/index_repair.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/index_repair.cpp b/src/mongo/db/catalog/index_repair.cpp index 8c22180f3ab..4b3744a9f23 100644 --- a/src/mongo/db/catalog/index_repair.cpp +++ b/src/mongo/db/catalog/index_repair.cpp @@ -52,7 +52,7 @@ StatusWith<int> moveRecordToLostAndFound(OperationContext* opCtx, // Creates the collection if it doesn't exist. if (!localCollection) { Status status = - writeConflictRetry(opCtx, "createLostAndFoundCollection", lostAndFoundNss.ns(), [&]() { + writeConflictRetry(opCtx, "createLostAndFoundCollection", lostAndFoundNss, [&]() { // Ensure the database exists. auto db = autoColl.ensureDbExists(opCtx); invariant(db, lostAndFoundNss.toStringForErrorMsg()); @@ -81,7 +81,7 @@ StatusWith<int> moveRecordToLostAndFound(OperationContext* opCtx, localCollection.makeYieldable(opCtx, LockedCollectionYieldRestore(opCtx, localCollection)); return writeConflictRetry( - opCtx, "writeDupDocToLostAndFoundCollection", nss.ns(), [&]() -> StatusWith<int> { + opCtx, "writeDupDocToLostAndFoundCollection", nss, [&]() -> StatusWith<int> { WriteUnitOfWork wuow(opCtx); Snapshotted<BSONObj> doc; int docSize = 0; @@ -130,7 +130,7 @@ int repairMissingIndexEntry(OperationContext* opCtx, int64_t numInserted = 0; Status insertStatus = Status::OK(); - writeConflictRetry(opCtx, "insertingMissingIndexEntries", nss.ns(), [&] { + writeConflictRetry(opCtx, "insertingMissingIndexEntries", nss, [&] { WriteUnitOfWork wunit(opCtx); insertStatus = accessMethod->insertKeysAndUpdateMultikeyPaths(opCtx, @@ -195,7 +195,7 @@ int repairMissingIndexEntry(OperationContext* opCtx, // duplicate records is in the index, so we need to add the newer record to the // index. if (dupKeyRid && ridToMove == *dupKeyRid) { - writeConflictRetry(opCtx, "insertingMissingIndexEntries", nss.ns(), [&] { + writeConflictRetry(opCtx, "insertingMissingIndexEntries", nss, [&] { WriteUnitOfWork wunit(opCtx); insertStatus = accessMethod->insertKeysAndUpdateMultikeyPaths( opCtx, coll, {ks}, {}, {}, options, nullptr, nullptr); |