1. Disable the automatic replication function of nodes
curl -PUT http://xxxx:9200/_cluster/settings -d '{"transient": {"cluster.routing.allocation.enable": "none"}}'
2. Restart the cluster nodes in turn
3. Restore the automatic replication function of the node
curl -PUT http://xxxx:9200/_cluster/settings -d '{"transient": {"cluster.routing.allocation.enable": "all"}}'