You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by kx...@apache.org on 2023/12/30 06:47:32 UTC
(doris) branch branch-2.0 updated: [Fix](segment iterator) fix wrong segment cache remove (#29333) (#29336)
This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 351e9e36d76 [Fix](segment iterator) fix wrong segment cache remove (#29333) (#29336)
351e9e36d76 is described below
commit 351e9e36d76ca26928302c77bd4de1496642c377
Author: airborne12 <ai...@gmail.com>
AuthorDate: Sat Dec 30 14:47:24 2023 +0800
[Fix](segment iterator) fix wrong segment cache remove (#29333) (#29336)
---
be/src/olap/rowset/segment_v2/segment_iterator.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.cpp b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
index 0a786d7a545..ee81f29c363 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
@@ -1987,7 +1987,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;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org