Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions be/src/cloud/cloud_base_compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "cloud/cloud_meta_mgr.h"
#include "cloud/config.h"
#include "common/config.h"
#include "common/metrics/doris_metrics.h"
#include "core/value/vdatetime_value.h"
#include "cpp/sync_point.h"
#include "service/backend_options.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/cloud/cloud_cumulative_compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "cloud/config.h"
#include "common/config.h"
#include "common/logging.h"
#include "common/metrics/doris_metrics.h"
#include "common/status.h"
#include "cpp/sync_point.h"
#include "service/backend_options.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/cloud/cloud_full_compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "cloud/cloud_storage_engine.h"
#include "cloud/config.h"
#include "common/config.h"
#include "common/metrics/doris_metrics.h"
#include "common/status.h"
#include "core/column/column.h"
#include "cpp/sync_point.h"
Expand Down
3 changes: 2 additions & 1 deletion be/src/cloud/cloud_tablet_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
#include "cloud/cloud_storage_engine.h"
#include "cloud/cloud_tablet.h"
#include "cloud/config.h"
#include "common/metrics/doris_metrics.h"
#include "common/status.h"
#include "cpp/lru_cache.h"
#include "cpp/sync_point.h"
#include "runtime/memory/cache_policy.h"
#include "util/debug_points.h"
#include "util/lru_cache.h"
#include "util/stack_util.h"

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/cloud/cloud_txn_delete_bitmap_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

#include <mutex>

#include "cpp/lru_cache.h"
#include "storage/olap_common.h"
#include "storage/partial_update_info.h"
#include "storage/rowset/rowset.h"
#include "storage/tablet/tablet_meta.h"
#include "storage/txn/txn_manager.h"
#include "util/countdown_latch.h"
#include "util/lru_cache.h"

namespace doris {

Expand Down
1 change: 1 addition & 0 deletions be/src/exec/scan/scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <atomic>
#include <vector>

#include "common/metrics/doris_metrics.h"
#include "common/status.h"
#include "core/block/block.h"
#include "runtime/exec_env.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/exprs/function/function_java_udf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <string>

#include "common/exception.h"
#include "common/metrics/doris_metrics.h"
#include "core/block/block.h"
#include "format/jni/jni_data_bridge.h"
#include "jni.h"
Expand Down
2 changes: 1 addition & 1 deletion be/src/load/channel/load_channel_mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

#include "common/compiler_util.h" // IWYU pragma: keep
#include "common/status.h"
#include "cpp/lru_cache.h"
#include "load/channel/load_channel.h"
#include "load/memtable/memtable_memory_limiter.h"
#include "runtime/memory/lru_cache_policy.h"
#include "runtime/memory/mem_tracker_limiter.h"
#include "runtime/thread_context.h"
#include "util/countdown_latch.h"
#include "util/lru_cache.h"
#include "util/uid_util.h"

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/load/channel/load_stream_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

#include <brpc/stream.h>

#include "cpp/lru_cache.h"
#include "load/channel/load_channel.h"
#include "load/channel/load_stream.h"
#include "runtime/exec_env.h"
#include "storage/rowset/rowset_factory.h"
#include "storage/rowset/rowset_meta.h"
#include "storage/storage_engine.h"
#include "storage/tablet/tablet_manager.h"
#include "util/lru_cache.h"
#include "util/uid_util.h"

namespace doris {
Expand Down
15 changes: 11 additions & 4 deletions be/src/runtime/memory/lru_cache_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
#include <memory>

#include "common/be_mock_util.h"
#include "cpp/lru_cache.h"
#include "runtime/memory/cache_policy.h"
#include "runtime/memory/lru_cache_value_base.h"
#include "runtime/memory/mem_tracker_limiter.h"
#include "runtime/thread_context.h"
#include "util/lru_cache.h"
#include "util/be_lru_cache_metrics.h"
#include "util/time.h"

namespace doris {
Expand All @@ -40,9 +41,12 @@ class LRUCachePolicy : public CachePolicy {
: CachePolicy(type, capacity, stale_sweep_time_s, enable_prune),
_lru_cache_type(lru_cache_type) {
if (check_capacity(capacity, num_shards)) {
_cache = std::shared_ptr<ShardedLRUCache>(
auto cache = std::shared_ptr<ShardedLRUCache>(
new ShardedLRUCache(type_string(type), capacity, lru_cache_type, num_shards,
element_count_capacity, is_lru_k));
cache->set_metrics_recorder(
create_be_lru_cache_metrics_recorder(type_string(type), cache.get()));
_cache = std::move(cache);
} else {
_cache = std::make_shared<doris::DummyLRUCache>();
}
Expand All @@ -58,10 +62,13 @@ class LRUCachePolicy : public CachePolicy {
: CachePolicy(type, capacity, stale_sweep_time_s, enable_prune),
_lru_cache_type(lru_cache_type) {
if (check_capacity(capacity, num_shards)) {
_cache = std::shared_ptr<ShardedLRUCache>(
auto cache = std::shared_ptr<ShardedLRUCache>(
new ShardedLRUCache(type_string(type), capacity, lru_cache_type, num_shards,
cache_value_time_extractor, cache_value_check_timestamp,
element_count_capacity, is_lru_k));
cache->set_metrics_recorder(
create_be_lru_cache_metrics_recorder(type_string(type), cache.get()));
_cache = std::move(cache);
} else {
_cache = std::make_shared<doris::DummyLRUCache>();
}
Expand Down Expand Up @@ -126,7 +133,7 @@ class LRUCachePolicy : public CachePolicy {
->set_tracking_bytes(tracking_bytes, _mem_tracker, value_tracking_bytes,
_value_mem_tracker);
}
return _cache->insert(key, value, charge, priority);
return _cache->insert(key, value, charge, priority, cache_value_deleter<LRUCacheValueBase>);
}

void for_each_entry(const std::function<void(const LRUHandle*)>& visitor) {
Expand Down
1 change: 1 addition & 0 deletions be/src/runtime/memory/memory_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "runtime/memory/memory_profile.h"

#include "bvar/reducer.h"
#include "common/metrics/doris_metrics.h"
#include "runtime/exec_env.h"
#include "runtime/memory/global_memory_arbitrator.h"
#include "runtime/memory/jemalloc_control.h"
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/query_cache/query_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
#include "common/config.h"
#include "common/status.h"
#include "core/block/block.h"
#include "cpp/lru_cache.h"
#include "io/fs/file_system.h"
#include "io/fs/path.h"
#include "runtime/exec_env.h"
#include "runtime/memory/lru_cache_policy.h"
#include "runtime/memory/mem_tracker.h"
#include "util/lru_cache.h"
#include "util/slice.h"
#include "util/time.h"

Expand Down
2 changes: 1 addition & 1 deletion be/src/service/point_query_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "common/status.h"
#include "core/data_type/data_type_factory.hpp"
#include "core/data_type_serde/data_type_serde.h"
#include "cpp/lru_cache.h"
#include "exec/sink/writer/vmysql_result_writer.h"
#include "exprs/vexpr.h"
#include "exprs/vexpr_context.h"
Expand All @@ -55,7 +56,6 @@
#include "storage/tablet/tablet_schema.h"
#include "storage/utils.h"
#include "util/jsonb/serialize.h"
#include "util/lru_cache.h"
#include "util/simd/bits.h"
#include "util/thrift_util.h"

Expand Down
2 changes: 1 addition & 1 deletion be/src/service/point_query_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "common/status.h"
#include "core/block/block.h"
#include "core/data_type_serde/data_type_serde.h"
#include "cpp/lru_cache.h"
#include "exprs/vexpr_fwd.h"
#include "runtime/descriptors.h"
#include "runtime/exec_env.h"
Expand All @@ -49,7 +50,6 @@
#include "storage/rowset/rowset.h"
#include "storage/tablet/tablet.h"
#include "storage/utils.h"
#include "util/lru_cache.h"
#include "util/mysql_global.h"
#include "util/slice.h"

Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/cache/page_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

#include "core/allocator.h"
#include "core/allocator_fwd.h"
#include "cpp/lru_cache.h"
#include "runtime/memory/lru_cache_policy.h"
#include "runtime/memory/mem_tracker_limiter.h"
#include "util/lru_cache.h"
#include "util/slice.h"

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/file_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
#include <string>
#include <vector>

#include "cpp/lru_cache.h"
#include "io/fs/file_reader.h"
#include "io/fs/file_writer.h"
#include "io/fs/local_file_system.h"
#include "storage/olap_common.h"
#include "storage/olap_define.h"
#include "storage/utils.h"
#include "util/debug_util.h"
#include "util/lru_cache.h"

namespace doris {

Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/index/inverted/inverted_index_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@

#include "common/config.h"
#include "common/status.h"
#include "cpp/lru_cache.h"
#include "io/fs/file_system.h"
#include "io/fs/path.h"
#include "runtime/exec_env.h"
#include "runtime/memory/lru_cache_policy.h"
#include "runtime/memory/mem_tracker.h"
#include "storage/index/inverted/inverted_index_searcher.h"
#include "util/lru_cache.h"
#include "util/slice.h"
#include "util/time.h"

Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/rowset/rowset_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "cloud/cloud_storage_engine.h"
#include "common/logging.h"
#include "common/status.h"
#include "cpp/lru_cache.h"
#include "cpp/sync_point.h"
#include "exec/common/variant_util.h"
#include "google/protobuf/util/message_differencer.h"
Expand All @@ -44,7 +45,6 @@
#include "storage/tablet/tablet_fwd.h"
#include "storage/tablet/tablet_schema.h"
#include "storage/tablet/tablet_schema_cache.h"
#include "util/lru_cache.h"

namespace doris {

Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/segment/condition_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@

#include "common/config.h"
#include "common/status.h"
#include "cpp/lru_cache.h"
#include "io/fs/file_system.h"
#include "io/fs/path.h"
#include "runtime/exec_env.h"
#include "runtime/memory/lru_cache_policy.h"
#include "runtime/memory/mem_tracker.h"
#include "util/lru_cache.h"
#include "util/slice.h"
#include "util/time.h"

Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/segment/segment_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

#include "common/cast_set.h"
#include "common/status.h"
#include "cpp/lru_cache.h"
#include "runtime/memory/lru_cache_policy.h"
#include "storage/olap_common.h" // for rowset id
#include "storage/segment/segment.h"
#include "util/lru_cache.h"
#include "util/time.h"

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/tablet/tablet_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "cloud/cloud_storage_engine.h"
#include "cloud/config.h"
#include "common/config.h"
#include "cpp/lru_cache.h"
#include "io/fs/file_writer.h"
#include "io/fs/local_file_system.h"
#include "storage/data_dir.h"
Expand All @@ -51,7 +52,6 @@
#include "storage/tablet/tablet_schema_cache.h"
#include "storage/utils.h"
#include "util/debug_points.h"
#include "util/lru_cache.h"
#include "util/mem_info.h"
#include "util/parse_util.h"
#include "util/string_util.h"
Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/tablet/tablet_meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@

#include "common/logging.h"
#include "common/status.h"
#include "cpp/lru_cache.h"
#include "io/fs/file_system.h"
#include "runtime/memory/lru_cache_policy.h"
#include "storage/binlog_config.h"
#include "storage/metadata_adder.h"
#include "storage/olap_common.h"
#include "storage/rowset/rowset_meta.h"
#include "storage/tablet/tablet_schema.h"
#include "util/lru_cache.h"
#include "util/uid_util.h"

namespace json2pb {
Expand Down
Loading
Loading