solr icon indicating copy to clipboard operation
solr copied to clipboard

SOLR-15861 wrap in try-catch block of calling ExecutorService lifecyc…

Open sammyhk opened this issue 3 years ago • 0 comments

…le API to support ManagedExecutorService

https://issues.apache.org/jira/browse/SOLR-15861

Description

ConcurrentUpdateSolrClient (and ConcurrentUpdateHttp2SolrClient) should work with JSR-236 javax.enterprise.concurrent.ManagedExecutorService. Currently due to the code calling the java.util.concurrent.ExecutorService lifecycle methods (e.g. isShutdown(), isTerminated()) which produce exception java.lang.IllegalStateException: Lifecycle operation not supported.

Solution

Wrap with try-catch block when calling those lifecycle methods.

Tests

Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.

Checklist

Please review the following and check all that apply:

  • [x] I have reviewed the guidelines for How to Contribute 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.
  • [ ] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • [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

sammyhk avatar Dec 21 '21 06:12 sammyhk