bitflicker64 commented on code in PR #3329:
URL: https://github.com/apache/hugegraph/pull/3329#discussion_r4267201354


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java:
##########
@@ -1133,9 +1141,46 @@ public Transaction tx() {
         return this.tx;
     }
 
+    private static Throwable collectCloseFailure(Throwable first, Throwable 
next) {

Review Comment:
   Minor: `collectCloseFailure` and `referencesFailure` are copied verbatim 
into three classes: here, `RaftBackendStoreProvider` (line 195) and 
`RaftContext` (line 220).
   
   The three copies implement the same Error-priority and cycle-avoidance 
rules. A later fix to one copy (for example how a cycle is logged) will not 
reach the other two, and the close paths would then report failures differently.
   
   Move the two methods into one public helper in hugegraph-core (for example 
next to `LockUtil` in `org.apache.hugegraph.util`) and call it from all three 
close paths.



-- 
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]

Reply via email to