From eb67db3d25b087a6b700e4622157bccc3f682003 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:31:41 +0800 Subject: [PATCH] branch-2.1: [feat](docker)Add a BE ENV item 'SKIP_CHECK_ULIMIT' for Docker to start quickly #45267 (#45468) Cherry-picked from #45267 Co-authored-by: FreeOnePlus <54164178+FreeOnePlus@users.noreply.github.com> --- be/src/olap/storage_engine.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/be/src/olap/storage_engine.cpp b/be/src/olap/storage_engine.cpp index 9402b3c1d9f807..788357d990acf7 100644 --- a/be/src/olap/storage_engine.cpp +++ b/be/src/olap/storage_engine.cpp @@ -409,6 +409,16 @@ Status StorageEngine::_check_file_descriptor_number() { << ", use default configuration instead."; return Status::OK(); } + if (getenv("SKIP_CHECK_ULIMIT") == nullptr) { + LOG(INFO) << "will check 'ulimit' value."; + } else if (std::string(getenv("SKIP_CHECK_ULIMIT")) == "true") { + LOG(INFO) << "the 'ulimit' value check is skipped" + << ", the SKIP_CHECK_ULIMIT env value is " << getenv("SKIP_CHECK_ULIMIT"); + return Status::OK(); + } else { + LOG(INFO) << "the SKIP_CHECK_ULIMIT env value is " << getenv("SKIP_CHECK_ULIMIT") + << ", will check ulimit value."; + } if (l.rlim_cur < config::min_file_descriptor_number) { LOG(ERROR) << "File descriptor number is less than " << config::min_file_descriptor_number << ". Please use (ulimit -n) to set a value equal or greater than "