imbajin commented on code in PR #812:
URL: 
https://github.com/apache/hugegraph-toolchain/pull/812#discussion_r4251097066


##########
hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadContext.java:
##########
@@ -206,10 +208,11 @@ public void updateSchemaCache() {
         this.schemaCache.updateAll();
     }
 
-    public void setLoadingMode() {
+    public synchronized void setLoadingMode() {
         String graph = this.client.graph().graph();
         try {
             this.client.graphs().mode(graph, GraphMode.LOADING);
+            this.loadingModeSet = true;

Review Comment:
   Added the explicit diagnostic while retaining the cleanup ownership guard. 
An unconfirmed mode write now logs the graph, the possibility that it remains 
in LOADING, and the need to check for active imports before manually resetting 
the mode. The original transport exception is rethrown unchanged; shutdown does 
not read or reset a mode it cannot claim.
   
   The regression uses the real HTTP/SDK response-loss path and verifies the 
error log, original IOException identity and absence of extra mode 
reads/writes. Client and Loader unit suites passed, with three independent 
final reviews. This provides the requested bounded diagnostic; automatic 
recovery and coordination between successful concurrent loaders remain open.



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