reindex dumper: remove lock when third batch of blocks arrive when first is not fully processed yet
the problem is with data_processor class and its triggering:
- when the data_processor is triggered first time it moves cached data to internal member
_dataPtr
what immediately triggers the thread to move the data from_dataPtr
to stack variabledataPtr
and start to processing it - when the data_processor is triggered second time and previous batch was not finished yet, the again new cached data are moved to member
_dataPtr
, bu because previous data are not process yet the thread was not triggered - when the data_processor is triggered third time and the first batch was not finished yet, then the trigger function will stuck on the mutex:
dlog("Trying to trigger data processor: ${d}...", ("d", _description));
std::lock_guard<std::mutex> lk(_mtx);
_dataPtr = std::move(dataPtr);
This stuck on mutex should not happen, instead new batch of data should be queued to process by the thread and immediately return to do not hold the trigger caller