aligned_layer icon indicating copy to clipboard operation
aligned_layer copied to clipboard

bug(aggregator): add `taskMutex` protection to `ClearTasksFromMap` go routine.

Open JulianVentura opened this issue 1 year ago • 0 comments

The taskMutex mutex is used in the aggregator to protect the batchesIdxByIdentifierHash, batchCreatedBlockByIdx, batchesIdentifierHashByIdx and batchDataByIdentifierHash internal maps, as well as the and nextBatchIndex variable.

Some of those structures are being modified inside the ClearTasksFromMap function, which runs on a separated go routine, without using the taskMutex.

Also, documentation of taskMutex should be updated to reflect all structures that it's protecting.

JulianVentura avatar Nov 13 '24 21:11 JulianVentura