snazy commented on code in PR #4543:
URL: https://github.com/apache/polaris/pull/4543#discussion_r3315474212


##########
persistence/nosql/async/java/src/main/java/org/apache/polaris/nosql/async/java/JavaPoolAsyncExec.java:
##########
@@ -239,7 +240,17 @@ public Cancelable<Void> schedulePeriodic(
 
   @SuppressWarnings("FutureReturnValueIgnored")
   private void immediate(CancelableFuture<?> cancelable) {
-    executorService.submit(cancelable);
+    try {
+      executorService.submit(cancelable);
+    } catch (RejectedExecutionException e) {
+      if (!cancelable.cancelledOrShutdown()) {

Review Comment:
   The harm is that it could retry again (delaying the close/shutdown) and 
potentially throw.
   Yes, hitting this is rare, but when it's hit, it's pretty annoying, even if 
it's just for tests.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to