This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 1f0111e8377 [fix](memory) Fix disable segment cache (#28169)
1f0111e8377 is described below
commit 1f0111e8377a0c775ede2998681a94d84f15aa29
Author: Xinyi Zou <[email protected]>
AuthorDate: Fri Dec 8 22:56:15 2023 +0800
[fix](memory) Fix disable segment cache (#28169)
---
be/src/olap/segment_loader.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/segment_loader.cpp b/be/src/olap/segment_loader.cpp
index 4704f8e802d..a0350dcfc2f 100644
--- a/be/src/olap/segment_loader.cpp
+++ b/be/src/olap/segment_loader.cpp
@@ -70,14 +70,14 @@ Status SegmentLoader::load_segments(const
BetaRowsetSharedPtr& rowset,
}
SegmentCache::CacheKey cache_key(rowset->rowset_id());
- if (_segment_cache->lookup(cache_key, cache_handle)) {
+ if (!config::disable_segment_cache && _segment_cache->lookup(cache_key,
cache_handle)) {
return Status::OK();
}
std::vector<segment_v2::SegmentSharedPtr> segments;
RETURN_IF_ERROR(rowset->load_segments(&segments));
- if (use_cache) {
+ if (use_cache && !config::disable_segment_cache) {
// memory of SegmentCache::CacheValue will be handled by SegmentCache
SegmentCache::CacheValue* cache_value = new SegmentCache::CacheValue();
cache_value->segments = std::move(segments);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]