snazy commented on code in PR #4504:
URL: https://github.com/apache/polaris/pull/4504#discussion_r3286438909
##########
persistence/nosql/async/vertx/src/main/java/org/apache/polaris/nosql/async/vertx/VertxAsyncExec.java:
##########
@@ -226,28 +263,27 @@ void execAsync(long unused) {
return;
}
// Skip overlapping periodic executions
- if (periodic && running.get()) {
+ if (periodic && !running.compareAndSet(false, true)) {
return;
}
try {
var f = executorService.submit(this);
runningFuture.set(f);
- } catch (RejectedExecutionException rex) {
- completable.completeExceptionally(rex);
+ VertxAsyncExec.this.taskSubmittedHook(f);
+ } catch (Throwable e) {
+ completable.completeExceptionally(e);
+ running.set(false);
Review Comment:
Before `completeExceptionally`? yea - that's better.
--
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]