This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 0359312a3ed branch-3.0: [feat](docker)Modify the init_be and start_be
scripts to meet the requirements for rapid Docker startup. #45269 (#45402)
0359312a3ed is described below
commit 0359312a3edadbd4e122f9514403669e2d6b1a37
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Dec 20 00:38:02 2024 +0800
branch-3.0: [feat](docker)Modify the init_be and start_be scripts to meet
the requirements for rapid Docker startup. #45269 (#45402)
Cherry-picked from #45269
Co-authored-by: FreeOnePlus <[email protected]>
---
bin/start_be.sh | 36 ++++++++++++++++++-----------------
docker/runtime/be/resource/init_be.sh | 1 +
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/bin/start_be.sh b/bin/start_be.sh
index cda69ba2918..3a48139fd60 100755
--- a/bin/start_be.sh
+++ b/bin/start_be.sh
@@ -175,29 +175,31 @@ if [[ "${RUN_VERSION}" -eq 1 ]]; then
exit 0
fi
-if [[ "$(uname -s)" != 'Darwin' ]]; then
- MAX_MAP_COUNT="$(cat /proc/sys/vm/max_map_count)"
- if [[ "${MAX_MAP_COUNT}" -lt 2000000 ]]; then
- echo "Set kernel parameter 'vm.max_map_count' to a value greater than
2000000, example: 'sysctl -w vm.max_map_count=2000000'"
- exit 1
+if [[ "${SKIP_CHECK_ULIMIT:- "false"}" != "true" ]]; then
+ if [[ "$(uname -s)" != 'Darwin' ]]; then
+ MAX_MAP_COUNT="$(cat /proc/sys/vm/max_map_count)"
+ if [[ "${MAX_MAP_COUNT}" -lt 2000000 ]]; then
+ echo "Set kernel parameter 'vm.max_map_count' to a value greater
than 2000000, example: 'sysctl -w vm.max_map_count=2000000'"
+ exit 1
+ fi
+
+ if [[ "$(swapon -s | wc -l)" -gt 1 ]]; then
+ echo "Disable swap memory before starting be"
+ exit 1
+ fi
fi
- if [[ "$(swapon -s | wc -l)" -gt 1 ]]; then
- echo "Disable swap memory before starting be"
+ MAX_FILE_COUNT="$(ulimit -n)"
+ if [[ "${MAX_FILE_COUNT}" -lt 60000 ]]; then
+ echo "Set max number of open file descriptors to a value greater than
60000."
+ echo "Ask your system manager to modify /etc/security/limits.conf and
append content like"
+ echo " * soft nofile 655350"
+ echo " * hard nofile 655350"
+ echo "and then run 'ulimit -n 655350' to take effect on current
session."
exit 1
fi
fi
-MAX_FILE_COUNT="$(ulimit -n)"
-if [[ "${MAX_FILE_COUNT}" -lt 60000 ]]; then
- echo "Set max number of open file descriptors to a value greater than
60000."
- echo "Ask your system manager to modify /etc/security/limits.conf and
append content like"
- echo " * soft nofile 655350"
- echo " * hard nofile 655350"
- echo "and then run 'ulimit -n 655350' to take effect on current session."
- exit 1
-fi
-
# add java libs
# Must add hadoop libs, because we should load specified jars
# instead of jars in hadoop libs, such as avro
diff --git a/docker/runtime/be/resource/init_be.sh
b/docker/runtime/be/resource/init_be.sh
index 61a3ddb2fe6..82b3007ba19 100644
--- a/docker/runtime/be/resource/init_be.sh
+++ b/docker/runtime/be/resource/init_be.sh
@@ -197,6 +197,7 @@ _main() {
fi
check_be_status
doris_note "Ready to start BE!"
+ export SKIP_CHECK_ULIMIT=true
${DORIS_HOME}/be/bin/start_be.sh --console &
child_pid=$!
wait $child_pid
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]