About Elasticsearch Reference [5.6] » Document APIs » Index API

(R00082) #1

in the link https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-index_.html#index-wait-for-active-shards

For example, suppose we have a cluster of three nodes, A, B, and C and we create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes). If we attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding. This means that even if B and C went down, and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data. If wait_for_active_shards is set on the request to 3 (and all 3 nodes are up), then the indexing operation will require 3 active shard copies before proceeding, a requirement which should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard. However, if we set wait_for_active_shards to all (or to 4, which is the same), the indexing operation will not proceed as we do not have all 4 copies of each shard active in the index. The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard

the desc above
are there 3 nodes and 1 primary shard 3 replicas shards
A node: 1 primary shard + 3rd replicas shard
B node: 1 st replicas shard
c node: 2 sec replicas shard
if we set wait_for_active_shards to all (or to 4, which is the same,and all 3 nodes are up)
is not the active node 4?
I think that the indexing operation will proceed
would you confirm it? is the document error?

(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.