Skip to content

[RFC] Provide clear information when a query exception occurs due to the number of search only shards being 0 #21099

@guojialiang92

Description

@guojialiang92

Is your feature request related to a problem? Please describe

We discussed and removed the restriction on the scale down operation in #20938: the number of search only replicas must be greater than 0.

This is very helpful in scenarios where a storage-compute separation architecture is already in use but a read-write separation architecture is not.

However, this introduces a new problem. If the query fails because the number of search only replicas is 0, we can only see the vague "all shards failed" exception.

Describe the solution you'd like

I plan to provide clear exception messages for the following two scenarios.

  • The query used preference "_search_replica" && the number of search only shards is 0
  • The query did not use preference "_search_replica" && the number of search only shards is 0 && INDEX_BLOCKS_SEARCH_ONLY_SETTING is true

Related component

Search

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

SearchSearch query, autocomplete ...etcenhancementEnhancement or improvement to existing feature or request

Type

No type
No fields configured for issues without a type.

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions