bitflicker64 commented on code in PR #2941:
URL:
https://github.com/apache/incubator-hugegraph/pull/2941#discussion_r2716894972
##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java:
##########
@@ -104,9 +104,23 @@ public void start(String name) {
LOG.info("Starting {} workers[{}] with queue size {}...",
this.workers, name, this.queueSize);
for (int i = 0; i < this.workers; i++) {
- this.runningFutures.add(
- this.executor.submit(new
ContextCallable<>(this::runAndDone)));
+ this.runningFutures.add(this.executor.submit(this::safeRun));
}
+
+ }
+ private Void safeRun() {
+ try {
+ new ContextCallable<>(this::runAndDone).call();
+ } catch (Throwable e) {
Review Comment:
Catching Throwable wasn’t intentional. I’ve updated the code to remove that
catch and keep `safeRun()` as `runAndDone()` + `latch.countDown()` in a
`finally` block.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]