diff options
Diffstat (limited to 'src/mongo/db/catalog/capped_utils.cpp')
| -rw-r--r-- | src/mongo/db/catalog/capped_utils.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/catalog/capped_utils.cpp b/src/mongo/db/catalog/capped_utils.cpp index 77ccf110f97..945881e58c5 100644 --- a/src/mongo/db/catalog/capped_utils.cpp +++ b/src/mongo/db/catalog/capped_utils.cpp @@ -43,7 +43,7 @@ #include "mongo/db/catalog/rename_collection.h" #include "mongo/db/catalog_raii.h" #include "mongo/db/client.h" -#include "mongo/db/concurrency/exception_util.h" +#include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/curop.h" #include "mongo/db/index_builds_coordinator.h" #include "mongo/db/namespace_string.h" @@ -245,7 +245,8 @@ void cloneCollectionAsCapped(OperationContext* opCtx, insertStmt.oplogSlot = oplogSlots.front(); } - uassertStatusOK(toCollection->insertDocument(opCtx, insertStmt, nullOpDebug, true)); + uassertStatusOK(toCollection->insertDocument( + opCtx, InsertStatement(objToClone), nullOpDebug, true)); wunit.commit(); // Go to the next document @@ -253,7 +254,7 @@ void cloneCollectionAsCapped(OperationContext* opCtx, } catch (const WriteConflictException&) { CurOp::get(opCtx)->debug().additiveMetrics.incrementWriteConflicts(1); retries++; // logAndBackoff expects this to be 1 on first call. - logWriteConflictAndBackoff(retries, "cloneCollectionAsCapped", fromNss.ns()); + WriteConflictException::logAndBackoff(retries, "cloneCollectionAsCapped", fromNss.ns()); // Can't use writeConflictRetry since we need to save/restore exec around call to // abandonSnapshot. |
