AndreyBozhko opened a new pull request, #2707:
URL: https://github.com/apache/solr/pull/2707

   https://issues.apache.org/jira/browse/SOLR-17448
   
   # Description
   
   There are quite a few places in Solr codebase where the background task is 
created by invoking `ExecutorService#submit(...)` method - but where the 
reference to the returned future is not retained.
   So if the background task fails for any reason, and the task doesn't itself 
have a try-catch block to log the failure, - the failure will go completely 
unnoticed.
   
   # Solution
   
   Replace the usage of `ExecutorService#submit` method with `Executor#execute` 
where appropriate - i.e., when the dispatched task is a Runnable, and the task 
result is not accessed in any way.
   
   ### Details
   The commit 4476adf5d075bdf77c5741ef69e999bb2c125e80 replaces `submit` with 
`execute` throughtout the codebase.
   
   After the replacement is done, some tests start failing - because there may 
be exceptions in background threads that have been ignored previously, and now 
they bubble up.
   
   Subsequent commits attempt to address those exceptions one-by-one, with more 
details included in the PR comments.
   
   # Tests
   
   Run existing tests and see if any of them reports an uncaught exception from 
a background thread. Address those cases one by one. May need to run CI a few 
times, to make sure no flaky tests are left.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [x] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended, not available for 
branches on forks living under an organisation)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
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...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to