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 Race in Closing IndicesService.CacheCleaner #42016

Conversation

original-brownbear
Copy link
Member

@original-brownbear original-brownbear commented May 9, 2019

  • When close becomes true while the management pool that would execute the Runnable here is being shut down, we run into an unhandeled EsRejectedExecutionException that fails tests
  • Found this while trying to reproduce IndexStatsIT#testFilterCacheStats fails #32506
    • Running the IndexStatsIT in a loop is a way of reproducing this

* When close becomes true while the management pool is shut down, we run
into an unhandled `EsRejectedExecutionException` that fails tests
* Found this while trying to reproduce elastic#32506
   * Running the IndexStatsIT in a loop is a way of reproducing this
@original-brownbear original-brownbear added >non-issue :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v8.0.0 v7.2.0 labels May 9, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

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.

LGTM. Thanks @original-brownbear.

@original-brownbear
Copy link
Member Author

thanks @dnhatn !

@original-brownbear original-brownbear merged commit d8417dc into elastic:master May 9, 2019
@original-brownbear original-brownbear deleted the fix-racy-exception-indices-service branch May 9, 2019 21:02
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request May 10, 2019
* When close becomes true while the management pool is shut down, we run
into an unhandled `EsRejectedExecutionException` that fails tests
* Found this while trying to reproduce elastic#32506
   * Running the IndexStatsIT in a loop is a way of reproducing this
original-brownbear added a commit that referenced this pull request May 10, 2019
* When close becomes true while the management pool is shut down, we run
into an unhandled `EsRejectedExecutionException` that fails tests
* Found this while trying to reproduce #32506
   * Running the IndexStatsIT in a loop is a way of reproducing this
@@ -1219,7 +1220,13 @@ public void run() {
}
// Reschedule itself to run again if not closed
if (closed.get() == false) {
threadPool.schedule(this, interval, ThreadPool.Names.SAME);
try {
threadPool.schedule(this, interval, ThreadPool.Names.SAME);
Copy link
Contributor

Choose a reason for hiding this comment

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

easier to use scheduleUnlessShuttingDown?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh sorry! Didn't know about that method, will open cleanup PR in a sec.

original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request May 10, 2019
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
* When close becomes true while the management pool is shut down, we run
into an unhandled `EsRejectedExecutionException` that fails tests
* Found this while trying to reproduce elastic#32506
   * Running the IndexStatsIT in a loop is a way of reproducing this
original-brownbear added a commit that referenced this pull request Jun 24, 2019
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jun 24, 2019
@original-brownbear original-brownbear restored the fix-racy-exception-indices-service branch August 6, 2020 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >non-issue v7.2.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants