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>
This commit is contained in:
github-actions[bot]
2024-12-19 09:31:41 +08:00
committed by GitHub
parent afeb5863ad
commit eb67db3d25

View File

@ -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 "