coderzc commented on code in PR #286:
URL:
https://github.com/apache/incubator-hugegraph-computer/pull/286#discussion_r1421702312
##########
computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java:
##########
@@ -152,29 +160,45 @@ private void registerShutdownHook() {
}
/**
- * Stop the worker service. Stop the managers created in
- * {@link #init(Config)}.
+ * Stop the worker service. Stop the managers created in {@link
#init(Config)}.
*/
@Override
public synchronized void close() {
- this.checkInited();
+ // TODO: why checkInited() here, if init throws exception, how to
close the resource?
+ //this.checkInited();
if (this.closed) {
LOG.info("{} WorkerService had closed before", this);
return;
}
- this.computeManager.close();
+ try {
+ this.computeManager.close();
Review Comment:
+1
--
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]