|
|
@ -221,6 +221,10 @@ Status ClueOp::LoadFile(const std::string &file, const int64_t start_offset, con
|
|
|
|
Status ClueOp::operator()() {
|
|
|
|
Status ClueOp::operator()() {
|
|
|
|
RETURN_IF_NOT_OK(CalculateNumRowsPerShard());
|
|
|
|
RETURN_IF_NOT_OK(CalculateNumRowsPerShard());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Move register to the front of launching thread, this will fix the problem
|
|
|
|
|
|
|
|
// when thread exit unnormally register will failed occasionally.
|
|
|
|
|
|
|
|
RETURN_IF_NOT_OK(io_block_queue_wait_post_.Register(tree_->AllTasks()));
|
|
|
|
|
|
|
|
|
|
|
|
// launch one thread, responsible for filling IoBlockQueue
|
|
|
|
// launch one thread, responsible for filling IoBlockQueue
|
|
|
|
RETURN_IF_NOT_OK(tree_->LaunchWorkers(1, std::bind(&ClueOp::WaitToFillIOBlockQueue, this)));
|
|
|
|
RETURN_IF_NOT_OK(tree_->LaunchWorkers(1, std::bind(&ClueOp::WaitToFillIOBlockQueue, this)));
|
|
|
|
|
|
|
|
|
|
|
@ -228,7 +232,6 @@ Status ClueOp::operator()() {
|
|
|
|
|
|
|
|
|
|
|
|
// must be called after launching workers.
|
|
|
|
// must be called after launching workers.
|
|
|
|
TaskManager::FindMe()->Post();
|
|
|
|
TaskManager::FindMe()->Post();
|
|
|
|
RETURN_IF_NOT_OK(io_block_queue_wait_post_.Register(tree_->AllTasks()));
|
|
|
|
|
|
|
|
NotifyToFillIOBlockQueue();
|
|
|
|
NotifyToFillIOBlockQueue();
|
|
|
|
|
|
|
|
|
|
|
|
while (!finished_reading_dataset_) {
|
|
|
|
while (!finished_reading_dataset_) {
|
|
|
|