This is an automated email from the ASF dual-hosted git repository.
zykkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8cba7a2672e [feat](docker)Add a BE ENV item 'SKIP_CHECK_ULIMIT' for
Docker to start quickly (#45267)
8cba7a2672e is described below
commit 8cba7a2672ee99febfa5787d7b2d1340fd00d855
Author: FreeOnePlus <[email protected]>
AuthorDate: Mon Dec 16 15:59:55 2024 +0800
[feat](docker)Add a BE ENV item 'SKIP_CHECK_ULIMIT' for Docker to start
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.
---
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 e00b5b595e2..24cda8232f1 100644
--- a/be/src/olap/storage_engine.cpp
+++ b/be/src/olap/storage_engine.cpp
@@ -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 "
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]