platoneko commented on code in PR #30782:
URL: https://github.com/apache/doris/pull/30782#discussion_r1479559468
##########
be/src/tools/meta_tool.cpp:
##########
@@ -150,8 +152,19 @@ Status init_data_dir(const std::string& dir,
std::unique_ptr<DataDir>* ret) {
return Status::InternalError("parse root path failed");
}
- std::unique_ptr<DataDir> p(
- new (std::nothrow) DataDir(path.path, path.capacity_bytes,
path.storage_medium));
+ doris::config::tablet_map_shard_size = 256;
+ doris::config::txn_map_shard_size = 1024;
+ doris::config::txn_shard_size = 1024;
+ doris::config::partition_disk_index_lru_size = 10000;
+ doris::config::delete_bitmap_agg_cache_capacity = 104857600;
+
+
doris::ExecEnv::GetInstance()->set_cache_manager(doris::CacheManager::create_global_instance());
+
doris::ExecEnv::GetInstance()->set_dummy_lru_cache(std::make_shared<doris::DummyLRUCache>());
+
+ std::unique_ptr<doris::StorageEngine> _engine =
+ std::make_unique<doris::StorageEngine>(doris::EngineOptions {});
+ std::unique_ptr<DataDir> p(new (std::nothrow) DataDir(
Review Comment:
The lifetime of the `StorageEngine` instance constructed in this way is only
within this function body, but the `DataDir` instance still needs to be used
after the function returns. Therefore, the `StorageEngine` instance encounters
a "use after free" issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]