You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/07/24 00:47:58 UTC

[GitHub] [cassandra] jonmeredith opened a new pull request #691: SEP.shutdownAndWait does not wait for termination and SEPExecutor.awa…

jonmeredith opened a new pull request #691:
URL: https://github.com/apache/cassandra/pull/691


   …itTermination may hang
   
   Fixes a couple of issues with the shared executor pool.
   
   SharedExecutorPool.shutdownAndWait calls shutdownNow on the executors it owns,
   which has the side effect of removing the executor from the list, then uses the
   same emptied list to try and wait for them to complete shutting down, exiting
   immediately.
   
   This exposed a follow on issue that if a SEPExecutor is shutdown immediately
   after maybeSchedule creates a new SEPWorker, but before the SEPWorker is able
   to execute the first task it would exit immediately on entering the work loop
   with a work and task permit reserved for it, but did not return them on exit.
   
   Ensure at least one trip around the outer loop to pick up the initially assigned
   executor, execute the task and then release the work and task permits correctly,
   so that shutdown.signalAll is called and the SEPExecutor.shutdownNow() task
   list is correct.
   
   Patch by Jon Meredith; reviewed by ? for CASSANDRA-15975


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org