Skip to content

Commit

Permalink
[Enhancement](merge-on-write) Support dynamic delete bitmap txn_delet…
Browse files Browse the repository at this point in the history
…e_bitmap_cache (#38761)

The default cache is set to 100MB, use memory limit to dynamic adjustmen
  • Loading branch information
hust-hhb authored and dataroaring committed Aug 4, 2024
1 parent 15906e3 commit afe4ab7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions be/src/cloud/cloud_storage_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "olap/memtable_flush_executor.h"
#include "olap/storage_policy.h"
#include "runtime/memory/cache_manager.h"
#include "util/parse_util.h"

namespace doris {

Expand Down Expand Up @@ -186,8 +187,15 @@ Status CloudStorageEngine::open() {
_calc_delete_bitmap_executor = std::make_unique<CalcDeleteBitmapExecutor>();
_calc_delete_bitmap_executor->init();

_txn_delete_bitmap_cache =
std::make_unique<CloudTxnDeleteBitmapCache>(config::delete_bitmap_agg_cache_capacity);
// The default cache is set to 100MB, use memory limit to dynamic adjustment
bool is_percent = false;
int64_t delete_bitmap_agg_cache_cache_limit =
ParseUtil::parse_mem_spec(config::delete_bitmap_dynamic_agg_cache_limit,
MemInfo::mem_limit(), MemInfo::physical_mem(), &is_percent);
_txn_delete_bitmap_cache = std::make_unique<CloudTxnDeleteBitmapCache>(
delete_bitmap_agg_cache_cache_limit > config::delete_bitmap_agg_cache_capacity
? delete_bitmap_agg_cache_cache_limit
: config::delete_bitmap_agg_cache_capacity);
RETURN_IF_ERROR(_txn_delete_bitmap_cache->init());

_file_cache_block_downloader = std::make_unique<io::FileCacheBlockDownloader>(*this);
Expand Down

0 comments on commit afe4ab7

Please sign in to comment.