Skip to content

Commit

Permalink
[BugFix] Fix metatool crash (StarRocks#55395)
Browse files Browse the repository at this point in the history
Fix metatool crash caused by uninitialized MemChunkAllocator

Fixes StarRocks#55394

Signed-off-by: Binglin Chang <decstery@gmail.com>
  • Loading branch information
decster authored Jan 24, 2025
1 parent cf1133b commit b5db8a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/tools/meta_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ int meta_tool_main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true);
starrocks::date::init_date_cache();
starrocks::config::disable_storage_page_cache = true;
starrocks::MemChunkAllocator::init_instance(nullptr, 2ul * 1024 * 1024 * 1024);

if (empty_args || FLAGS_operation.empty()) {
show_usage();
Expand Down Expand Up @@ -1107,7 +1108,6 @@ int meta_tool_main(int argc, char** argv) {
}

} else if (FLAGS_operation == "dump_short_key_index") {
starrocks::MemChunkAllocator::init_instance(nullptr, 2ul * 1024 * 1024 * 1024);
if (FLAGS_file == "") {
std::cout << "no file set for dump short key index" << std::endl;
return -1;
Expand Down

0 comments on commit b5db8a7

Please sign in to comment.