You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elasticsearch version (bin/elasticsearch --version): 5.4.0
Plugins installed: [x-pack]
JVM version (java -version):
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
OS version (uname -a if on a Unix-like system):
Linux searchlog001 4.4.0-96-generic #119-Ubuntu SMP
Description of the problem including expected versus actual behavior: GET /_cat/nodes?h=id returns just the first four characters of the node id, so it seems as if this would suffice to identify a node. However, when using just the first four characters as value for preference=_prefer_nodes:..., the preference does not get honored and search results from replicas on other nodes may get returned. The preference does only apply when one uses the full-length ID of a node.
Steps to reproduce:
Setup a cluster with at least two nodes. Create an index with a single shard and one replica
Index a single document
Do curl $ELASTIC_HOST:9200/_cat/nodes?h=name,id to obtain a short node ID and the host name
Query for the document with "explain": true to see the node in the response and set preference=_prefer_nodes:$NODE_ID, repeat to see eventually varying node IDs in the response
Do curl $ELASTIC_HOST:9200/_nodes to get the full-length node IDs (keys in /nodes)
Query for the document as above but with the preference using the full, repeat to always see the specified node ID in the response
The text was updated successfully, but these errors were encountered:
The short ID is for display purposes. There is a documented parameter for the cat nodes API (like full_id) that shows the full ID needed for preferences. I’m closing this as expected behavior and not a bug.
I see. But as specified in the report, I am using 5.4.0. The docs for 5.4
don't mention `full_id` at all (
https://www.elastic.co/guide/en/elasticsearch/reference/5.4/cat-nodes.html).
Is this just undocumented in this version or has it been added later?
2017-12-15 18:55 GMT+01:00 Jason Tedor <notifications@github.com>:
Elasticsearch version (
bin/elasticsearch --version
): 5.4.0Plugins installed: [x-pack]
JVM version (
java -version
):java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
OS version (
uname -a
if on a Unix-like system):Linux searchlog001 4.4.0-96-generic #119-Ubuntu SMP
Description of the problem including expected versus actual behavior:
GET /_cat/nodes?h=id
returns just the first four characters of the node id, so it seems as if this would suffice to identify a node. However, when using just the first four characters as value forpreference=_prefer_nodes:...
, the preference does not get honored and search results from replicas on other nodes may get returned. The preference does only apply when one uses the full-length ID of a node.Steps to reproduce:
curl $ELASTIC_HOST:9200/_cat/nodes?h=name,id
to obtain a short node ID and the host name"explain": true
to see the node in the response and setpreference=_prefer_nodes:$NODE_ID
, repeat to see eventually varying node IDs in the responsecurl $ELASTIC_HOST:9200/_nodes
to get the full-length node IDs (keys in/nodes
)The text was updated successfully, but these errors were encountered: