If the number of tasks to be executed great equal than 1, stop loading (#3881)

* If the number of tasks to be executed great equal than 2, stop loading

Signed-off-by: Wang Xiangyu <xy.wang@zilliz.com>

* limit 1 to execute task

Signed-off-by: Wang Xiangyu <xy.wang@zilliz.com>
This commit is contained in:
Wang Xiangyu 2020-09-26 16:14:38 +08:00 committed by GitHub
parent 77200fd322
commit eed4dade0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ TaskTable::PickToLoad(uint64_t limit) {
} else if (table_[index]->state == TaskTableItemState::LOADED) {
cross = true;
++loaded_count;
if (loaded_count > 2) {
if (loaded_count >= 1) {
return std::vector<uint64_t>();
}
} else if (table_[index]->state == TaskTableItemState::START) {