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

Add global and index level blocks to IndexSettings #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

villelaitila
Copy link

This pull request adds a new getIndexBlocks() method to the IndexSettings class. This method returns a ClusterBlocks object that can be used to retrieve the current global level and index level blocks set on the IndexShard object which the index settings belongs to.

While the purpose of such method has been discussed via another channel few weeks ago, it resurfaced recently after the merge of elastic#35332 in which we added check for global/index blocks in the primary action of transport replication actions. This change caused some tests to fail on CI (see elastic#35597): the TransportResyncReplicationAction failed and the replica was never promoted to primary before the test timed out. The resync failed because the primary action in TransportResyncReplicationAction checks blocks using the cluster state from the ClusterService, which is not yet updated and in the case of this tests still contains a global "no master" block, whereas it should check blocks against the blocks from the incoming cluster state that is not yet applied.

This pull request changes the IndicesClusterStateService so that blocks are updated and propagated to the IndexSettings. After elastic#35332 has been recomited again (it was reverted to allow CI to pass), a follow up PR will change how blocks are checked in TransportReplicationAction so that it uses blocks from indexShard.indexSettings().getIndexBlocks().

@makimat
Copy link

makimat commented Nov 19, 2018

Softagram Impact Report for pull/23 (head commit: 8413466)

⭐ Visual Overview

Changed elements and changed dependencies.
Changed dependencies - click for full size
Graph legend
(Open in Softagram Desktop for full details)

⭐ Change Impact

How the changed files are used by the rest of the project
Impacted files - click for full size
Graph legend
(Open in Softagram Desktop for full details)

📄 Full report

Give feedback of this report to support@softagram.com

@softagram-bot
Copy link

Softagram Impact Report for pull/23 (head commit: 8413466)

⭐ Visual Overview

Changed elements and changed dependencies.
Changed dependencies - click for full size
Graph legend
(Open in Softagram Desktop for full details)

⭐ Change Impact

How the changed files are used by the rest of the project
Impacted files - click for full size
Graph legend
(Open in Softagram Desktop for full details)

📄 Full report

Give feedback of this report to support@softagram.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants