Skip to content

Conversation

@gwbrown
Copy link
Contributor

@gwbrown gwbrown commented Oct 3, 2019

Backports the following commits to 7.x:

Rollover previously requested index stats for all indices in the
provided alias, which causes an exception when there is a closed index
with that alias.

This commit adjusts the IndicesOptions used on the index stats
request so that closed indices are ignored, rather than throwing
an exception.
@gwbrown
Copy link
Contributor Author

gwbrown commented Oct 4, 2019

I made some additional changes (c4af93c) to get testConditionEvaluationWhenAliasToWriteAndReadIndicesConsidersOnlyPrimariesFromWriteIndex working because mockito really didn't like the call to setIndicesOptions() and I couldn't get it working.

The changes to TransportRolloverAction and the aforementioned test come largely from 516b4b9#diff-4ccddd34bfa02bac08555fd1720bd33c, as the changes in that PR made this a non-issue in master.

@gwbrown gwbrown requested a review from dakrone October 4, 2019 17:49
@gwbrown gwbrown added the :Data Management/Indices APIs APIs to create and manage indices and templates label Oct 4, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM

@gwbrown gwbrown merged commit e47bdf7 into elastic:7.x Oct 4, 2019
gwbrown added a commit to gwbrown/elasticsearch that referenced this pull request Oct 9, 2019
…tic#47539)

Rollover previously requested index stats for all indices in the
provided alias, which causes an exception when there is a closed index
with that alias.

This commit adjusts the IndicesOptions used on the index stats
request so that closed indices are ignored, rather than throwing
an exception.

This is mostly a backport of elastic#47148, but the behavior is slightly
different: If the write index is closed, rollover will throw an
exception, as 6.8 cannot retrieve index stats for closed indices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Data Management/Indices APIs APIs to create and manage indices and templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants