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


##########
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java:
##########
@@ -1965,18 +2000,57 @@ private void listenChanges() {
             LOG.debug("RestServer accepts event '{}'", event.name());
             event.checkArgs(HugeGraph.class);
             HugeGraph graph = (HugeGraph) event.args()[0];
-            this.graphs.put(graph.spaceGraphName(), graph);
+            this.publishGraph(graph);

Review Comment:
   [P2] Complete the local graph publication ordering
   
   At this head, createGraphLocal still emits GRAPH_CREATE (line 1456) before 
publishGraph. Production bootstrap registers ContextGremlinServer's listener 
first, so it injects the graph into Gremlin bindings before the later 
GraphManager listener registers/exports cache RPC services. With dynamic local 
graphs, cache RPC and shared storage enabled, an authorized concurrent Gremlin 
request can use the graph during that window; writes can miss peer 
invalidation. The candidate is also exposed before a later export failure is 
known.
   
   Please call publishGraph(graph) before the local GRAPH_CREATE event, as the 
PD path already does, retaining rollback. Add a regression using Gremlin-first 
listener registration and a latch-blocked RPC publication, asserting that the 
graph is not visible until publication succeeds.
   
   This is a remaining gap in the late-registration fix, not a regression newly 
introduced by this PR. Evidence is the current-head source ordering through 
HugeGraphServer, ContextGremlinServer and EventHub; no distributed stale-read 
reproduction is claimed.



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