Skip to content

Commit

Permalink
[feat](docker)Add a BE ENV item 'SKIP_CHECK_ULIMIT' for Docker to sta…
Browse files Browse the repository at this point in the history
…rt quickly (#45267)

In the storage_engine.cpp of the BE process, it is mandatory to check
that the `ulimit` value must be greater than 60,000. When starting with
Docker or Docker-Compose, it is necessary to preemptively change the
corresponding value on the host machine. This change is very unfriendly
to Docker, as it loses its unique advantage of being able to "build
quickly and anywhere," and cannot become a fundamental capability for
rapid startup. Therefore, a new environment variable has been added to
control whether to skip this check value. The default value is false,
which enforces the check of this value. When set to true, it skips the
check and starts directly.
  • Loading branch information
FreeOnePlus authored Dec 16, 2024
1 parent 91c475e commit 8cba7a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions be/src/olap/storage_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,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 "
Expand Down

0 comments on commit 8cba7a2

Please sign in to comment.