Skip to content

[Improve](metadata)Start the script to set metadata_failure_recovery - #24308

Merged
yiguolei merged 1 commit into
apache:masterfrom
CalvinKirs:metadata-recover
Sep 14, 2023
Merged

[Improve](metadata)Start the script to set metadata_failure_recovery#24308
yiguolei merged 1 commit into
apache:masterfrom
CalvinKirs:metadata-recover

Conversation

@CalvinKirs

@CalvinKirsCalvinKirs commented Sep 13, 2023

Copy link
Copy Markdown
Member

Backend

Many people set meta_recovery in fe.conf, but often forget to change it back after doing it, so fe keeps using it like this, and as a result, problems with the metadata later occur.

We can add this parameter to start_fe.sh --metadata_failure_recovery to do this. In this way, if the user starts fe at the same time, it will automatically fail next time.

Changes

  • allowed use start_fe.sh -- metadata_failure_recovery or start_fe.sh --daemon -- metadata_failure_recovery
  • Setting up metadata recovery via configuration files is no longer allowed

Test

image
2023-09-13 17:30:05,808 INFO (main|1) [BDBEnvironment.setup():101] start group reset
2023-09-13 17:30:06,913 INFO (MASTER fe_38192775_8511_425f_9d31_39aaf9f69841(-1)|1) [BDBEnvironment.setup():105] group has been reset.

@github-actions

Copy link
Copy Markdown
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck ' returned error 1 finding the following syntactical issues:
----------
In bin/start_fe.sh line 229:
nohup ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${METADATA_FAILURE_RECOVERY} "$@" >>"${LOG_DIR}/fe.out" 2>&1 </dev/null &
^--------------------------^ SC2248 (style): Prefer double quoting even when variables don't contain special characters.
Did you mean: nohup ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} "${METADATA_FAILURE_RECOVERY}" "$@" >>"${LOG_DIR}/fe.out" 2>&1 </dev/null &
In bin/start_fe.sh line 232:
${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${OPT_VERSION:+${OPT_VERSION}} ${METADATA_FAILURE_RECOVERY} "$@" </dev/null
^--------------------------^ SC2248 (style): Prefer double quoting even when variables don't contain special characters.
Did you mean: ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${OPT_VERSION:+${OPT_VERSION}} "${METADATA_FAILURE_RECOVERY}" "$@" </dev/null
For more information:
https://www.shellcheck.net/wiki/SC2248 -- Prefer double quoting even when v...
----------
You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
# shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.
shfmt errors

'shfmt ' returned error 1 finding the following formatting issues:
----------
--- bin/start_fe.sh.orig
+++ bin/start_fe.sh
@@ -55,7 +55,7 @@
;;
--metadata_failure_recovery)
METADATA_FAILURE_RECOVERY="-r"
- shift + shift
;;
--helper)
HELPER="$2"
@@ -226,10 +226,10 @@
echo "Internal Error. USE IMAGE_TOOL like : ./start_fe.sh --image image_path"
fi
elif [[ "${RUN_DAEMON}" -eq 1 ]]; then
- nohup ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${METADATA_FAILURE_RECOVERY} "$@" >>"${LOG_DIR}/fe.out" 2>&1 </dev/null &
+ nohup ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${METADATA_FAILURE_RECOVERY} "$@" >>"${LOG_DIR}/fe.out" 2>&1 </dev/null &
else
export DORIS_LOG_TO_STDERR=1
- ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${OPT_VERSION:+${OPT_VERSION}} ${METADATA_FAILURE_RECOVERY} "$@" </dev/null
+ ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${OPT_VERSION:+${OPT_VERSION}} ${METADATA_FAILURE_RECOVERY} "$@" </dev/null
fi
echo $! >"${pidfile}"
----------
You can reformat the above files to meet shfmt's requirements by typing:
shfmt -w filename

@CalvinKirs

Copy link
Copy Markdown
MemberAuthor

run buildall

@github-actions

Copy link
Copy Markdown
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors
'shellcheck ' found no issues.
shfmt errors

'shfmt ' returned error 1 finding the following formatting issues:
----------
--- bin/start_fe.sh.orig
+++ bin/start_fe.sh
@@ -55,7 +55,7 @@
;;
--metadata_failure_recovery)
METADATA_FAILURE_RECOVERY="-r"
- shift + shift
;;
--helper)
HELPER="$2"
@@ -226,10 +226,10 @@
echo "Internal Error. USE IMAGE_TOOL like : ./start_fe.sh --image image_path"
fi
elif [[ "${RUN_DAEMON}" -eq 1 ]]; then
- nohup ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} "${METADATA_FAILURE_RECOVERY}" "$@" >>"${LOG_DIR}/fe.out" 2>&1 </dev/null &
+ nohup ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} "${METADATA_FAILURE_RECOVERY}" "$@" >>"${LOG_DIR}/fe.out" 2>&1 </dev/null &
else
export DORIS_LOG_TO_STDERR=1
- ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${OPT_VERSION:+${OPT_VERSION}} "${METADATA_FAILURE_RECOVERY}" "$@" </dev/null
+ ${LIMIT:+${LIMIT}} "${JAVA}" ${final_java_opt:+${final_java_opt}} -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError="kill -9 %p" org.apache.doris.DorisFE ${HELPER:+${HELPER}} ${OPT_VERSION:+${OPT_VERSION}} "${METADATA_FAILURE_RECOVERY}" "$@" </dev/null
fi
echo $! >"${pidfile}"
----------
You can reformat the above files to meet shfmt's requirements by typing:
shfmt -w filename

yiguolei
yiguolei previously approved these changes Sep 13, 2023

@yiguoleiyiguolei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Sep 13, 2023
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@CalvinKirs

Copy link
Copy Markdown
MemberAuthor

run buildall

@zy-kkkzy-kkk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@doris-robot

Copy link
Copy Markdown

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46 seconds
stream load tsv: 595 seconds loaded 74807831229 Bytes, about 119 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17162208254 Bytes

@sollhuisollhui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiguoleiyiguolei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiguolei

Copy link
Copy Markdown
Contributor

run clickbench

@yiguolei

Copy link
Copy Markdown
Contributor

run ckbench

@doris-robot

Copy link
Copy Markdown

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.58 seconds
stream load tsv: 605 seconds loaded 74807831229 Bytes, about 117 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17162244970 Bytes

@yiguolei
yiguolei merged commit 64337a8 into apache:masterSep 14, 2023
@CalvinKirs
CalvinKirs deleted the metadata-recover branch September 14, 2023 02:49
@xiaokangxiaokang mentioned this pull request Sep 28, 2023
@xiaokangxiaokang mentioned this pull request Dec 3, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/2.0.2-mergedkind/behavior-changedmerge_conflictreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@CalvinKirs@doris-robot@yiguolei@zy-kkk@sollhui@xiaokang