@@ -487,6 +487,7 @@ func (t *localTraverser) prepareHashingThreads(preprocessor objectMorpher, proce
487
487
return err
488
488
}
489
489
}
490
+ processor = mutexProcessor (processor )
490
491
491
492
// spin up hashing threads
492
493
for i := 0 ; i < hashingThreadCount ; i ++ {
@@ -575,7 +576,7 @@ func (t *localTraverser) prepareHashingThreads(preprocessor objectMorpher, proce
575
576
noMetdata ,
576
577
"" , // Local has no such thing as containers
577
578
),
578
- mutexProcessor ( processor ),
579
+ processor , // the original processor is wrapped in the mutex processor.
579
580
)
580
581
_ , err = getProcessingError (err )
581
582
if err != nil {
@@ -589,6 +590,7 @@ func (t *localTraverser) prepareHashingThreads(preprocessor objectMorpher, proce
589
590
// wrap the processor, try to grab hashes, or defer processing to the goroutines
590
591
hashingProcessor = func (storedObject StoredObject ) error {
591
592
if storedObject .entityType != common .EEntityType .File () {
593
+ // the original processor is wrapped in the mutex processor.
592
594
return processor (storedObject ) // no process folders
593
595
}
594
596
@@ -603,6 +605,7 @@ func (t *localTraverser) prepareHashingThreads(preprocessor objectMorpher, proce
603
605
switch err {
604
606
case ErrorNoHashPresent , ErrorHashNoLongerValid , ErrorHashNotCompatible :
605
607
glcm .Info ("No usable hash is present for " + fullPath + ". Will transfer if not present at destination." )
608
+ // the original processor is wrapped in the mutex processor.
606
609
return processor (storedObject ) // There is no hash data, so this file will be overwritten (in theory).
607
610
case ErrorHashAsyncCalculation :
608
611
return nil // File will be processed later
@@ -620,7 +623,8 @@ func (t *localTraverser) prepareHashingThreads(preprocessor objectMorpher, proce
620
623
}
621
624
622
625
// delay the mutex until after potentially long-running operations
623
- return mutexProcessor (processor )(storedObject )
626
+ // the original processor is wrapped in the mutex processor.
627
+ return processor (storedObject )
624
628
}
625
629
626
630
return finalizer , hashingProcessor
0 commit comments