shubhamvishu commented on PR #12183: URL: https://github.com/apache/lucene/pull/12183#issuecomment-1716957965
@jpountz I have made some changes to the `TermStates#build` to unblock this PR and avoid the deadlock issue happening due to executor forking into itself by checking if its a `ThreadPoolExecutor` executor and check the executor state(i.e. no. of threads actively executing) and only submit the task to it when there are enough free threads to do so. i.e. we are making use of only considering `(X-1)` threads of the thread pool(which is having fixed `X` threads) and keeping/leaving at least **one thread** behind to avoid any deadlock issues so that there would always be one thread available to run those tasks("problemtic" tasks which are forking again into the executor). This passes all the tests and also the failing seeds. Instead of keeping this PR blocked till we address #12438 maybe we could consider this fix(short term?) to unblock this PR but in long term we could have a recommended concurrent executor as you mentioned in the issue #12438 to solve these issues. Let me know what do you think? -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org