Avoid consistency problem when has no more data (#1716)

This commit is contained in:
Yunfeng,Wu
2019-08-29 18:57:49 +08:00
committed by Mingyu Chen
parent 7a0c7f45b2
commit ecbdfc2cee
2 changed files with 6 additions and 2 deletions

View File

@ -47,6 +47,10 @@ Status ResultQueueMgr::fetch_result(const TUniqueId& fragment_instance_id, std::
// sentinel nullptr indicates scan end
if (*result == nullptr) {
*eos = true;
// put sentinel for consistency, avoid repeated invoking fetch result when hava no rowbatch
if (queue != nullptr) {
queue->blocking_put(nullptr);
}
} else {
*eos = false;
}