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


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java:
##########
@@ -77,18 +48,16 @@ public ServerInfoManager(HugeGraphParams graph, 
ExecutorService dbExecutor) {
 
         this.globalNodeInfo = null;
 
-        this.onlySingleNode = false;
         this.closed = false;
     }
 
     public void init() {
-        HugeServerInfo.schema(this.graph).initSchemaIfNeeded();
+        // ServerInfo is soft-disabled; keep this method for compatibility.
     }
 
     public synchronized boolean close() {

Review Comment:
   ⚠️ `ServerInfoManager` is now soft-disabled, but `close()` still opens the 
system transaction via `this.tx().close()` and calls `graph.closeTx()`.
   
   That means both scheduler close paths still retain a shutdown-time backend 
dependency through this compatibility stub, even though server-info persistence 
is no longer used:
   
   - `StandardTaskScheduler.close()` calls `serverManager.close()`
   - `DistributedTaskScheduler.close()` calls `serverManager().close()`
   
   The impact is mostly during shutdown: if the backend connection is already 
closing, or the graph is partially torn down, scheduler shutdown can still 
fail/block because a disabled ServerInfo component touches 
`systemTransaction()`.
   
   The smallest fix is to make `close()` match the new soft-disabled behavior 
and keep it purely in-memory:
   
   ```suggestion
       public synchronized boolean close() {
           this.closed = true;
           return true;
       }
   ```
   
   It would also be good to add a unit test similar to 
`testInitDoesNotAccessBackendStore()` that verifies `close()` does not call 
`systemTransaction()` or `closeTx()`.
   
   Related existing comments that should not be missed:
   
   - Running-task delete can resurrect the task record after physical deletion: 
https://github.com/apache/hugegraph/pull/2937#discussion_r3432918294
   - `delete(false)` can mark an existing task as `DELETING` while 
`TaskAPI.delete()` reports it as missing: 
https://github.com/apache/hugegraph/pull/2937#discussion_r3432919036



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