@@ -39,12 +39,6 @@ if [ -d "$GHE_DATA_DIR/current/elasticsearch" ]; then
39
39
link_dest=" --link-dest=../../current/elasticsearch"
40
40
fi
41
41
42
- # Store the existing flush_threshold_size setting if it exists and if does not set it to ES default
43
- current_threshold=$( ghe-ssh " $host " -- curl -s " localhost:9200/_settings" | jq -r ' .[].settings.index.translog.flush_threshold_size' )
44
- if [ -z " $current_threshold " ]; then
45
- current_threshold=" 512MB"
46
- fi
47
-
48
42
# Transfer ES indices from a GitHub instance to the current snapshot
49
43
# directory, using a previous snapshot to avoid transferring files that have
50
44
# already been transferred.
@@ -60,15 +54,15 @@ log_rsync "END elasticsearch rsync" 1>&3
60
54
# Set up a trap to re-enable flushing on exit and remove temp file
61
55
cleanup () {
62
56
ghe_verbose " * Enabling ES index flushing ..."
63
- echo " { \" index \ " :{\" translog.flush_threshold_size\" : \" $current_threshold \" }} " |
57
+ echo ' {"transient ":{"index. translog.flush_threshold_size":null}} ' |
64
58
ghe-ssh " $host " -- curl -s -XPUT " localhost:9200/_settings" -d @- > /dev/null
65
59
}
66
60
trap ' cleanup' EXIT
67
61
trap ' exit $?' INT # ^C always terminate
68
62
69
63
# Disable ES flushing and force a flush right now
70
64
ghe_verbose " * Disabling ES index flushing ..."
71
- echo ' {"index ":{"translog.flush_threshold_size":"1PB"}}' |
65
+ echo ' {"transient ":{"index. translog.flush_threshold_size":"1PB"}}' |
72
66
ghe-ssh " $host " -- curl -s -XPUT " localhost:9200/_settings" -d @- > /dev/null
73
67
ghe-ssh " $host " -- curl -s -XPOST " localhost:9200/_flush" > /dev/null
74
68
0 commit comments