Copilot commented on code in PR #2791:
URL:
https://github.com/apache/incubator-hugegraph/pull/2791#discussion_r2137976376
##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java:
##########
@@ -154,6 +154,9 @@ public <V> void restoreTasks() {
LOG.info("restore task {}", task);
this.restore(task);
}
+
+ this.graph.graphTransaction().commit();
+ this.graph.closeTx();
Review Comment:
[nitpick] Enclose the commit and closeTx calls in a try/finally block so
that closeTx() is always executed even if commit() throws an exception.
```suggestion
try {
this.graph.graphTransaction().commit();
} finally {
this.graph.closeTx();
}
```
--
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]