Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix](segment iterator) fix wrong segment cache remove #29333

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion be/src/olap/rowset/segment_v2/segment_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,8 @@ Status SegmentIterator::_read_columns_by_rowids(std::vector<ColumnId>& read_colu

Status SegmentIterator::next_batch(vectorized::Block* block) {
auto status = [&]() { RETURN_IF_CATCH_EXCEPTION({ return _next_batch_internal(block); }); }();
if (!status.ok()) {
// if rows read by batch is 0, will return end of file, we should not remove segment cache in this situation.
if (!status.ok() && !status.is<END_OF_FILE>()) {
_segment->remove_from_segment_cache();
}
return status;
Expand Down
Loading