@@ -503,11 +503,16 @@ func (verifier *Verifier) getDocumentsCursor(ctx context.Context, collection *mo
503503 }
504504 }
505505 findCmd := append (bson.D {{"find" , collection .Name ()}}, findOptions ... )
506- verifier .logger .Debug ().
507- Interface ("task" , task .PrimaryKey ).
508- Str ("findCmd" , fmt .Sprintf ("%s" , findCmd )).
509- Str ("options" , fmt .Sprintf ("%v" , * runCommandOptions )).
510- Msg ("getDocuments findCmd." )
506+
507+ // Suppress this log for recheck tasks because the list of IDs can be
508+ // quite long.
509+ if len (task .Ids ) == 0 {
510+ verifier .logger .Debug ().
511+ Interface ("task" , task .PrimaryKey ).
512+ Str ("findCmd" , fmt .Sprintf ("%s" , findCmd )).
513+ Str ("options" , fmt .Sprintf ("%v" , * runCommandOptions )).
514+ Msg ("getDocuments findCmd." )
515+ }
511516
512517 return collection .Database ().RunCommandCursor (ctx , findCmd , runCommandOptions )
513518}
@@ -595,16 +600,6 @@ func (verifier *Verifier) ProcessVerifyTask(ctx context.Context, workerNum int,
595600 Interface ("task" , task .PrimaryKey ).
596601 Msg ("Processing document comparison task." )
597602
598- defer func () {
599- elapsed := time .Since (start )
600-
601- verifier .logger .Debug ().
602- Int ("workerNum" , workerNum ).
603- Interface ("task" , task .PrimaryKey ).
604- Stringer ("timeElapsed" , elapsed ).
605- Msg ("Finished document comparison task." )
606- }()
607-
608603 problems , docsCount , bytesCount , err := verifier .FetchAndCompareDocuments (
609604 ctx ,
610605 task ,
@@ -681,12 +676,24 @@ func (verifier *Verifier) ProcessVerifyTask(ctx context.Context, workerNum int,
681676 }
682677 }
683678
684- return errors .Wrapf (
685- verifier .UpdateVerificationTask (ctx , task ),
686- "failed to persist task %s's new status (%#q)" ,
687- task .PrimaryKey ,
688- task .Status ,
689- )
679+ err = verifier .UpdateVerificationTask (ctx , task )
680+
681+ if err != nil {
682+ return errors .Wrapf (
683+ err ,
684+ "failed to persist task %s's new status (%#q)" ,
685+ task .PrimaryKey ,
686+ task .Status ,
687+ )
688+ }
689+
690+ verifier .logger .Debug ().
691+ Int ("workerNum" , workerNum ).
692+ Interface ("task" , task .PrimaryKey ).
693+ Stringer ("timeElapsed" , time .Since (start )).
694+ Msg ("Finished document comparison task." )
695+
696+ return nil
690697}
691698
692699func (verifier * Verifier ) logChunkInfo (ctx context.Context , namespaceAndUUID * uuidutil.NamespaceAndUUID ) {
0 commit comments