Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-cluster search: preserve cluster alias in shard failures #32608

Merged
merged 3 commits into from
Aug 6, 2018

Commits on Aug 3, 2018

  1. Cross-cluster search: preserve cluster alias in shard failures

    When some remote clusters return shard failures as part of a cross-cluster search request, the cluster alias currently gets lost. As a result, if the shard failures are all caused by the same error, and against indices belonging to different clusters, but with the same index name, only one failure gets returned as part of the search response, meaning that failures are grouped by index name, ignoring the cluster alias.
    
    With this commit we make sure that `ShardSearchFailure` returns the cluster alias as part of the index name. Also, we set the fully qualfied index name when creating a `QueryShardException`. That way shard failures are grouped by cluster:index. Such fixes should cover at least most of the cases where either 1) the shard target is set but we don't have the index in the cause (we were previously reading it only from the cause that does not have the cluster alas) 2) the shard target is missing but if the cause is a `QueryShardException` the clusterAlias does not get lost.
    
    We also prevent NPE in case the failure cause is not set and test such scenario.
    javanna committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    fe2709d View commit details
    Browse the repository at this point in the history
  2. fix comment

    javanna committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    d880374 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4cac3c8 View commit details
    Browse the repository at this point in the history