File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -115,11 +115,6 @@ MONGO_FAIL_POINT_DEFINE(sleepBetweenInsertOpTimeGenerationAndLogOp);
115115// are visible, but before we have advanced 'lastApplied' for the write.
116116MONGO_FAIL_POINT_DEFINE (hangBeforeLogOpAdvancesLastApplied);
117117
118- // so we can fail the same way
119- void checkOplogInsert (Status result) {
120- massert (17322 , str::stream () << " write to oplog failed: " << result.toString (), result.isOK ());
121- }
122-
123118bool shouldBuildInForeground (OperationContext* opCtx,
124119 const BSONObj& index,
125120 const NamespaceString& indexNss,
@@ -327,7 +322,11 @@ void _logOpsInner(OperationContext* opCtx,
327322 str::stream () << " logOp() but can't accept write to collection " << nss.ns ());
328323 }
329324
330- checkOplogInsert (oplogCollection->insertDocumentsForOplog (opCtx, records, timestamps));
325+ Status result = oplogCollection->insertDocumentsForOplog (opCtx, records, timestamps);
326+ if (!result.isOK ()) {
327+ severe () << " write to oplog failed: " << result.toString ();
328+ fassertFailed (17322 );
329+ }
331330
332331 // Set replCoord last optime only after we're sure the WUOW didn't abort and roll back.
333332 opCtx->recoveryUnit ()->onCommit (
You can’t perform that action at this time.
0 commit comments