Skip to content

Conversation

@javanna
Copy link
Member

@javanna javanna commented Feb 12, 2025

Auto expand replicas is meant to be entirely disabled for stateless indices. The only scenario where a change needs to be applied is when the number of replicas is initialized to 0, in which case 0 needs to be turned into 1. Otherwise, no changes should be applied in stateless indices despite auto expand replicas is used.

The current handling for this was missing an early exit of the indices loop in the case where 0 shoudl be turned into 1, that leads to a potentially higher number of copies being allocated (effectively auto-expand gets applied by mistake).

Auto expand replicas is meant to be entirely disabled for stateless indices.
The only scenario where a change needs to be applied is when the number of replicas
is initialized to 0, in which case 0 needs to be turned into 1. Otherwise, no changes
should be applied in stateless indices despite auto expand replicas is used.

The current handling for this was missing an early exit of the indices loop in the case
where 0 shoudl be turned into 1, that leads to a potentially higher number of copies
being allocated (effectively auto-expand gets applied by mistake).
@javanna javanna added >bug :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. :Search Foundations/Search Catch all for Search Foundations v9.1.0 labels Feb 12, 2025
@elasticsearchmachine elasticsearchmachine added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch Team:Distributed Indexing Meta label for Distributed Indexing team labels Feb 12, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine
Copy link
Collaborator

Hi @javanna, I've created a changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing)

@javanna javanna removed the :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. label Feb 12, 2025
@elasticsearchmachine elasticsearchmachine removed the Team:Distributed Indexing Meta label for Distributed Indexing team label Feb 12, 2025
Copy link
Member

@piergm piergm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for working on this Luca! 👍

@javanna javanna added the :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. label Feb 12, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Indexing Meta label for Distributed Indexing team label Feb 12, 2025
@javanna javanna merged commit 8f28bc2 into elastic:main Feb 12, 2025
16 of 17 checks passed
@javanna javanna deleted the fix/auto_expand_replicas_stateles branch February 12, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. :Search Foundations/Search Catch all for Search Foundations Team:Distributed Indexing Meta label for Distributed Indexing team Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants