Avoid consistency problem when has no more data (#1716)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user