Skip to content

CCS: Should timeout parameter be honored? #32678

@spinscale

Description

@spinscale

While testing some Cross Cluster Search behaviour I noticed search timeouts are not being honored.

Note: This might be intended behaviour so feel free to close this issue.

Reproduction, started two one node clusters with different clustername

./bin/elasticsearch -Enode.name=rhincodon -Ecluster.name=alr -Enode.max_local_storage_nodes=2
./bin/elasticsearch -Enode.name=remote01 -Ecluster.name=remote -Enode.max_local_storage_nodes=2

configure CCS

curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "search": {
      "remote": {
        "cluster_remote": {
          "seeds": [
            "127.0.0.1:9301"
          ]
        }
      }
    }
  }
}
'

Now check that CCS works

curl -X PUT localhost:9200/foo
curl -X PUT localhost:9201/bar
curl localhost:9200/cluster_remote:bar,foo/_search

In order to simulate a failure I stopped the remote cluster node, and ran netcat -l 9301, a service that receives data but does not reply anything (i.e. emulating a GC).

Now running a search ends up like this

curl 'localhost:9200/cluster_remote:bar,foo/_search?timeout=5s'
{"error":{"root_cause":[{"type":"connect_transport_exception","reason":"[][127.0.0.1:9301] handshake_timeout[30s]"}],"type":"connect_transport_exception","reason":"[][127.0.0.1:9301] handshake_timeout[30s]"},"status":500}

As you can see the timeout is the 30s handshake timeout and curl also only returns after 30 seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions