Skip to content

Commit

Permalink
[SR-4078] Fix for single source (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pslydhh authored Sep 15, 2021
1 parent 6062e8f commit a27bf35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions be/src/runtime/data_stream_recvr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ bool DataStreamRecvr::SenderQueue::has_chunk() {
return true;
}

// try_get_chunk will only be used when has_chunk return true(explicitly or implicitly).
bool DataStreamRecvr::SenderQueue::try_get_chunk(vectorized::Chunk** chunk) {
std::unique_lock<std::mutex> l(_lock);
if (_is_cancelled) {
Expand Down
6 changes: 5 additions & 1 deletion be/src/runtime/vectorized/sorted_chunks_merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ Status SortedChunksMerger::get_next_for_pipeline(ChunkPtr* chunk, std::atomic<bo
// single source
if (_single_probe_supplier) {
Chunk* tmp_chunk = nullptr;
*eos = !_single_probe_supplier(&tmp_chunk);
if (_single_has_supplier()) {
*eos = !_single_probe_supplier(&tmp_chunk);
} else {
*should_exit = true;
}
(*chunk).reset(tmp_chunk);
return Status::OK();
}
Expand Down

0 comments on commit a27bf35

Please sign in to comment.