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

[Close Index API] Propagate tasks ids between Freeze, Close and Verify Shard actions #36630

Merged
merged 4 commits into from
Jan 7, 2019

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Dec 14, 2018

Note: this pull request will be merged in the close-index-api-refactoring branch

This pull request changes the Freeze Index and Close Index actions so that these actions always requires a Task. The task's id is then propagated from the Freeze action to the Close action, and then to the Verify shard action. This way it is possible to track which Freeze task initiates the closing of an index, and which consecutive verifiy shard are executed for the index closing.

This change has no tests - I could write one using a MockTaskManager listener but it seemed a bit overkill to me.

@tlrx tlrx added >enhancement v7.0.0 :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. labels Dec 14, 2018
@tlrx tlrx requested a review from ywelsch December 14, 2018 08:06
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@tlrx tlrx force-pushed the close-index-api-refactoring branch 2 times, most recently from 51005de to ef6ae69 Compare December 17, 2018 09:29
@tlrx tlrx requested a review from ywelsch December 17, 2018 10:54
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@tlrx
Copy link
Member Author

tlrx commented Dec 18, 2018

@elasticmachine run the default distro tests

@tlrx
Copy link
Member Author

tlrx commented Dec 18, 2018

@elasticmachine test this please

1 similar comment
@tlrx
Copy link
Member Author

tlrx commented Dec 19, 2018

@elasticmachine test this please

@tlrx
Copy link
Member Author

tlrx commented Dec 20, 2018

@elasticmachine run gradle build tests 1

@tlrx tlrx merged commit 1959388 into elastic:close-index-api-refactoring Jan 7, 2019
@tlrx
Copy link
Member Author

tlrx commented Jan 7, 2019

Thanks @ywelsch

@tlrx tlrx deleted the use-task-id branch January 7, 2019 08:44
tlrx added a commit that referenced this pull request Jan 14, 2019
This commit backports to 6.x of the Close Index API refactoring.

It cherry-picks the following commits from master:
3ca885e [Close Index API] Add TransportShardCloseAction for pre-closing verifications (#36249)
8e5dd20 [Close Index API] Refactor MetaDataIndexStateService (#36354)
7372529 [Tests] Reduce randomization in CloseWhileRelocatingShardsIT (#36694)
103c4d4 [Close Index API] Mark unavailable shard copy as stale during verification (#36755)
1959388 [Close Index API] Propagate tasks ids between Freeze, Close and Verify(#36630)
e149b08 [Close Index API] Add unique UUID to ClusterBlock (#36775)
dc371ef [Tests] Fix ReopenWhileClosingIT with correct min num shards

The following two commits were needed to adapt the change to 6.x:
ef6ae69 [Close Index API] Adapt MetaDataIndexStateServiceTests after merge
21b7653 [Tests] Adapt CloseIndexIT tests for 6.x

Related to #33888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. >enhancement v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants