imbajin commented on code in PR #357:
URL:
https://github.com/apache/hugegraph-computer/pull/357#discussion_r3690175045
##########
computer/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/SenderIntegrateTest.java:
##########
@@ -128,11 +129,15 @@ public void testOneWorker() {
masterThread.start();
workerThread.start();
+ Throwable failure = null;
try {
CompletableFuture.allOf(workerFuture, masterFuture).join();
+ } catch (RuntimeException | Error e) {
+ failure = e;
+ throw e;
} finally {
- workerServiceRef.get().close();
- masterServiceRef.get().close();
+ closeServices(failure, workerServiceRef.get(),
Review Comment:
⚠️ The latest head removed the test-level 30-second BSP timeouts, but all
three cases still use an unbounded, non-fail-fast
`CompletableFuture.allOf(...).join()`. If one service fails while a peer
remains in a BSP wait, this `finally` is not reached and the test can block for
the 24-hour default worker/master timeout, defeating the fail-fast behavior
described for this fix. Please restore bounded test BSP timeouts and a
first-failure bounded wait that triggers cleanup, then cover one failed service
with an unfinished peer.
##########
computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java:
##########
@@ -194,8 +193,12 @@ public synchronized void close() {
}
try {
- this.bsp4Worker.workerCloseDone();
- this.bsp4Worker.close();
+ if (this.bsp4Worker != null) {
+ if (this.inited) {
Review Comment:
‼️ A worker can publish `workerInitDone()` at line 115 and then fail in
`connectToWorkers()` or `managers.initedAll()` before `inited` becomes true.
This new guard then skips `workerCloseDone()`, even though the master may
already have counted the worker and will wait for every close-done key for up
to `BSP_WAIT_WORKERS_TIMEOUT` (24 hours by default). Please track the narrower
registered/assigned lifecycle state and emit close-done whenever that state was
reached, with a regression that fails after registration but before full
initialization.
--
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]