Skip to content

Commit 9cd575e

Browse files
authored
Merge pull request #434 from github/enterprise-3.7-backport-378-fix-es-translog-setting
Backport 378 for 3.7: Replace deprecated translog flush setting in ES
2 parents 4880f3c + 4c63cb6 commit 9cd575e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

share/github-backup-utils/ghe-backup-es-rsync

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#/
55
#/ Note: This command typically isn't called directly. It's invoked by
66
#/ ghe-backup when the rsync strategy is used.
7+
# shellcheck disable=SC2086
78
set -e
89

910
# Bring in the backup configuration
@@ -53,15 +54,15 @@ ghe-rsync -avz \
5354
# Set up a trap to re-enable flushing on exit and remove temp file
5455
cleanup () {
5556
ghe_verbose "* Enabling ES index flushing ..."
56-
echo '{"index":{"translog.disable_flush":false}}' |
57+
echo '{"index":{"translog.flush_threshold_size":"512MB"}}' |
5758
ghe-ssh "$host" -- curl -s -XPUT "localhost:9200/_settings" -d @- >/dev/null
5859
}
5960
trap 'cleanup' EXIT
6061
trap 'exit $?' INT # ^C always terminate
6162

6263
# Disable ES flushing and force a flush right now
6364
ghe_verbose "* Disabling ES index flushing ..."
64-
echo '{"index":{"translog.disable_flush":true}}' |
65+
echo '{"index":{"translog.flush_threshold_size":"1PB"}}' |
6566
ghe-ssh "$host" -- curl -s -XPUT "localhost:9200/_settings" -d @- >/dev/null
6667
ghe-ssh "$host" -- curl -s -XPOST "localhost:9200/_flush" >/dev/null
6768

0 commit comments

Comments
 (0)