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

Fix AutoFollowIT.testPauseAndResumeWithMultipleAutoFollowPatterns #48128

Merged
merged 4 commits into from
Oct 21, 2019

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Oct 16, 2019

The test testPauseAndResumeWithMultipleAutoFollowPatterns failed multiple times, mostly because it creates too many leader indices and the following cluster cannot cope with cluster state updates generated by following indices creation and pause/resume auto-followers changes.

This PR simplifies the test by creating at most 20 leader indices and by waiting for any new leader index to be picked up by the auto-follower before created another leader index. It also pause and resume less auto-followers as previously.

closes #47917

@tlrx tlrx added >test Issues or PRs that are addressing/adding tests :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features v8.0.0 v7.5.0 labels Oct 16, 2019
@tlrx tlrx requested a review from dnhatn October 16, 2019 13:10
@elasticmachine
Copy link
Collaborator

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

@tlrx
Copy link
Member Author

tlrx commented Oct 16, 2019

@elasticmachine test this please

1 similar comment
@tlrx
Copy link
Member Author

tlrx commented Oct 16, 2019

@elasticmachine test this please

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

I left a smaller comment but LGTM. Thanks Tanguy.

while (running.get()) {
while (running.get() && leaderIndices.get() < 20) {
final String prefix = randomFrom(prefixes);
final String leaderIndex = prefix + randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
Copy link
Member

Choose a reason for hiding this comment

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

I think we can have duplicate indices here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, thanks! I adapted the logic a bit to not create duplicate indices here.

@tlrx
Copy link
Member Author

tlrx commented Oct 21, 2019

@elasticmachine update branch

(Lucene versions tests failed)

@tlrx tlrx merged commit 652bda7 into elastic:master Oct 21, 2019
@tlrx tlrx deleted the fix-47917 branch October 21, 2019 11:25
@tlrx
Copy link
Member Author

tlrx commented Oct 21, 2019

Thanks @dnhatn !

tlrx added a commit to tlrx/elasticsearch that referenced this pull request Oct 21, 2019
…astic#48128)

The test testPauseAndResumeWithMultipleAutoFollowPatterns
failed multiple times, mostly because it creates too many leader
indices and the following cluster cannot cope with cluster state
updates generated by following indices creation and pause/
resume auto-followers changes.

This commit simplifies the test by creating at most 20 leader
indices and by waiting for any new leader index to be picked
up by the auto-follower before created another leader index.
It also pause and resume less auto-followers as previously.

closes elastic#47917
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >test Issues or PRs that are addressing/adding tests v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AutoFollowIT failures
4 participants