Skip to content

Conversation

@tlrx
Copy link
Member

@tlrx tlrx commented Dec 4, 2020

When IndicesService is stopping on a data node, it closes every
IndexService instances that are existing by calling the
removeIndex(Index, IndexRemovalReason, String) method.

The IndexRemovalReason that is passed as a parameter in this
case is NO_LONGER_ASSIGNED which is also the one passed
in other situation like removing an index because it got assigned
to another data node. The fact that the same reason is used in
multiple cases make it difficult for IndexEventListener to do the
distinction between an index closed because the node is
shutting down and an index closed between it moved away.

This commit changes the IndexRemovalReason used when
closing the IndicesService to be SHUTDOWN.

backport of #65816

…65816)

When IndicesService is stopping on a data node, it closes every 
IndexService instances that are existing by calling the 
removeIndex(Index, IndexRemovalReason, String) method.

The IndexRemovalReason that is passed as a parameter in this 
case is NO_LONGER_ASSIGNED which is also the one passed
 in other situation like removing an index because it got assigned 
to another data node. The fact that the same reason is used in 
multiple cases make it difficult for IndexEventListener to do the
 distinction between an index closed because the node is 
shutting down and an index closed between it moved away.

This commit changes the IndexRemovalReason used when 
closing the IndicesService to be SHUTDOWN.
@tlrx tlrx added >non-issue :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. backport v7.11.0 labels Dec 4, 2020
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Dec 4, 2020
@elasticmachine
Copy link
Collaborator

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

@tlrx tlrx merged commit 2bca76d into elastic:7.x Dec 4, 2020
@tlrx tlrx deleted the indicesservice-removal-reason-when-closing-7.x branch December 4, 2020 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. >non-issue Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v7.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants