Merge pull request #433 from github/enterprise-3.6-backport-378-fix-es-translog-setting
Backport 378 for 3.6: Replace deprecated translog flush setting in ES
This commit is contained in:
Коммит
7a9d4b67c4
|
@ -4,6 +4,7 @@
|
|||
#/
|
||||
#/ Note: This command typically isn't called directly. It's invoked by
|
||||
#/ ghe-backup when the rsync strategy is used.
|
||||
# shellcheck disable=SC2086
|
||||
set -e
|
||||
|
||||
# Bring in the backup configuration
|
||||
|
@ -53,7 +54,7 @@ ghe-rsync -avz \
|
|||
# Set up a trap to re-enable flushing on exit and remove temp file
|
||||
cleanup () {
|
||||
ghe_verbose "* Enabling ES index flushing ..."
|
||||
echo '{"index":{"translog.disable_flush":false}}' |
|
||||
echo '{"index":{"translog.flush_threshold_size":"512MB"}}' |
|
||||
ghe-ssh "$host" -- curl -s -XPUT "localhost:9200/_settings" -d @- >/dev/null
|
||||
}
|
||||
trap 'cleanup' EXIT
|
||||
|
@ -61,7 +62,7 @@ trap 'exit $?' INT # ^C always terminate
|
|||
|
||||
# Disable ES flushing and force a flush right now
|
||||
ghe_verbose "* Disabling ES index flushing ..."
|
||||
echo '{"index":{"translog.disable_flush":true}}' |
|
||||
echo '{"index":{"translog.flush_threshold_size":"1PB"}}' |
|
||||
ghe-ssh "$host" -- curl -s -XPUT "localhost:9200/_settings" -d @- >/dev/null
|
||||
ghe-ssh "$host" -- curl -s -XPOST "localhost:9200/_flush" >/dev/null
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче