Last active
December 19, 2015 22:38
-
-
Save nik9000/6028478 to your computer and use it in GitHub Desktop.
Can't reopen index if you closed it without enough nodes to host half the lucene indexes in each shard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Launch two nodes | |
curl -XDELETE "http://localhost:9200/test_close?pretty=true" | |
# Create more replicas then we have nodes | |
curl -XPOST "http://localhost:9200/test_close?pretty=true" -d '{ | |
"settings": { | |
"number_of_shards": 5, | |
"number_of_replicas": 3 | |
} | |
}' | |
# Wait until all the shards that are going to allocate have allocated | |
sleep 5 | |
curl -XGET "http://localhost:9200/_cluster/health?pretty=true" | |
# Close the index | |
curl -XPOST "http://localhost:9200/test_close/_close?pretty=true" | |
# Wait a bit and open it | |
sleep 2 | |
curl -XPOST "http://localhost:9200/test_close/_open?pretty=true" | |
watch -d curl -s -XGET "http://localhost:9200/_cluster/health?pretty=true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment