File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ namespace {
159
159
try {
160
160
status = indexer.init (_index);
161
161
if ( status.code () == ErrorCodes::IndexAlreadyExists ) {
162
- if (allowBackgroundBuilding) {
162
+ if (allowBackgroundBuilding && !haveSetBgIndexStarting ) {
163
163
// Must set this in case anyone is waiting for this build.
164
164
_setBgIndexStarting ();
165
165
}
@@ -209,11 +209,14 @@ namespace {
209
209
status = wce.toStatus ();
210
210
}
211
211
212
- if (status.code () != ErrorCodes::WriteConflict)
212
+ if (status.code () == ErrorCodes::WriteConflict) {
213
+ LOG (2 ) << " WriteConflictException while creating index in IndexBuilder, retrying." ;
214
+ } else if (status.code () == 28550 ) {
215
+ LOG (2 ) << " Status 28550 when building an index in IndexBuilder, retrying" ;
216
+ } else {
213
217
return status;
218
+ }
214
219
215
-
216
- LOG (2 ) << " WriteConflictException while creating index in IndexBuilder, retrying." ;
217
220
txn->recoveryUnit ()->commitAndRestart ();
218
221
}
219
222
}
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ namespace {
313
313
b.appendTimestamp (" ts" , slot.first .asDate ());
314
314
b.append (" op" , opstr);
315
315
b.append (" ns" , ns);
316
- if (fromMigrate)
316
+ if (fromMigrate)
317
317
b.appendBool (" fromMigrate" , true );
318
318
if ( bb )
319
319
b.appendBool (" b" , *bb);
@@ -412,6 +412,8 @@ namespace {
412
412
checkOplogInsert (localOplogRSCollection->insertDocument (txn, op, false ));
413
413
414
414
if (!(lastOptime < ts)) {
415
+ auto opBeingApplied = op.toString ();
416
+ auto previousOp = (--it)->toString ();
415
417
severe () << " replication oplog stream went back in time. "
416
418
" previous timestamp: " << lastOptime << " newest timestamp: " << ts
417
419
<< " . Op being applied: " << op;
@@ -680,9 +682,9 @@ namespace {
680
682
// in the query for idempotence
681
683
}
682
684
}
683
- else {
685
+ else {
684
686
// this could happen benignly on an oplog duplicate replay of an upsert
685
- // (because we are idempotent),
687
+ // (because we are idempotent),
686
688
// if an regular non-mod update fails the item is (presumably) missing.
687
689
if ( !upsert ) {
688
690
failedUpdate = true ;
You can’t perform that action at this time.
0 commit comments