imbajin commented on code in PR #3138:
URL: https://github.com/apache/hugegraph/pull/3138#discussion_r3763206204


##########
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java:
##########
@@ -1342,19 +1350,38 @@ public HugeGraph createGraph(String graphSpace, String 
name, String creator,
         graph.updateTime(timeStamp);
 
         String graphName = spaceGraphName(graphSpace, name);
+        this.graphs.put(graphName, graph);

Review Comment:
   ‼️ `graphs.put()` and the synchronous GRAPH_CREATE notification run before 
`addGraphConfig`, `notifyGraphAdd`, `updateGraphSpaceConfig`, and schema 
initialization. If any later step throws, this method exits without removing 
the local graph/bindings, closing and unregistering the graph, or compensating 
metadata already written, so the failed request can leave a graph that blocks 
retry and can be published to other servers. Please extend one rollback 
boundary across the publish/schema phase, with best-effort local binding and 
HugeFactory cleanup plus compensation for partially written PD metadata.



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