Skip to content

Fix Race in AsyncTwoPhaseIndexerTests.testStateMachine (#40947) #41013

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

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

original-brownbear
Copy link
Member

  • The step is incremented by the listener in org.elasticsearch.xpack.core.indexing.AsyncTwoPhaseIndexerTests.MockIndexer#onFinish after isFinished is set to true, but the test only waited for isFinished,
    fixed by calling isFinished last
  • Also made step volatile since we are reading it from a different thread from the one incrementing it
  • Closes AsyncTwoPhaseIndexerTests testStateMachine CI failures #40946

backport of #40947

* The step is incremented by the listner in `org.elasticsearch.xpack.core.indexing.AsyncTwoPhaseIndexerTests.MockIndexer#onFinish` after isFinished is set to true, but the test only waited for `isFinished`,
fixed by calling `isFinished` last
* Also made `step` volatile since we are reading it from different thread from the one incrementing it
* Closes elastic#40946
@original-brownbear original-brownbear added >test Issues or PRs that are addressing/adding tests :Analytics/Geo Indexing, search aggregations of geo points and shapes backport :ml/Transform Transform labels Apr 9, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@original-brownbear original-brownbear merged commit e71db05 into elastic:7.x Apr 9, 2019
@original-brownbear original-brownbear deleted the 40947-7.x branch April 9, 2019 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes backport :ml/Transform Transform >test Issues or PRs that are addressing/adding tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants