bitflicker64 commented on code in PR #3221:
URL: https://github.com/apache/hugegraph/pull/3221#discussion_r4248287604
##########
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java:
##########
@@ -1453,6 +1457,8 @@ private HugeGraph createGraphLocal(HugeConfig config,
String name) {
// Let gremlin server and rest server add graph to context
this.notifyEvent(Events.GRAPH_CREATE, graph);
+ // a graph created through the API replaces a failed startup load
of that name
+ this.failedGraphs.remove(name);
Review Comment:
Important: this clears a failed startup load only when the create goes
through `createGraphLocal`, and `createGraph` calls that only inside `if
(!isPDEnabled())` (line 1495). With `usePD=true` a create continues to
`this.graphs.put(graphName, graph)` (line 1613), and the lazy load from meta in
`graph(graphSpace, name)` (lines 2243-2244) takes the same path. Neither
touches `failedGraphs`: at this head the map is written only at lines 1272,
1274 and 1461.
This is the PD half of my earlier comment on this method, which named only
the `usePD=false` path. With `usePD=true` (what the Helm chart and the hstore
CI job set), `init()` still loads `conf/graphs`. If a file fails there and a
graph of that name is later created through the graphs API or loaded from meta,
the Server serves it while `/readiness` keeps answering 503 with `1 configured
graph(s) failed to load`, so a readiness probe pointed at `/readiness` holds
the Pod out of the Service. The README section added here says the gate clears
when "a graph of that name is created through the graphs API", which holds only
without PD.
Requested change: clear the entry on the PD path too, for a graph in the
`DEFAULT` space (where `loadGraph` puts local graphs), after the `GRAPH_CREATE`
notify has succeeded, as line 1461 does here, and add a case for it. If the
gate is meant to hold with PD, please say that in the README instead.
--
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]