bitflicker64 opened a new issue, #3086:
URL: https://github.com/apache/hugegraph/issues/3086

   ### Bug Type (问题类型)
   
   None
   
   ### Before submit
   
   - [x] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 
[FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have 
confirmed and searched that there are no similar problems in the historical 
issue and documents)
   
   ### Environment (环境信息)
   
   - Server Version: 1.0.0 (Apache Release Version)
   - Backend: RocksDB x nodes, HDD or SSD 
   - OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x 
   - Data Size:  xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) -->
   
   
   ### Expected & Actual behavior (期望与实际表现)
   
   ## Background  
     
   PR #3082 soft-disabled the pre-PD master-worker scheduling path and 
intentionally left  
   deprecated config handling, role-election wiring, and `ServerInfoManager` 
persistence as  
   compatibility scaffolding. This issue tracks the follow-up physical removal 
("phase 2")  
   called out in the merge comment ("TODO: cleanup legacy code/configs in 
phrase2").  
     
   ## Scope of removal  
     
   ### 1. Deprecated config warnings + transition tests (low risk)  
   - `task.scheduler_type` warning block in `StandardHugeGraph`  
   - `ENABLE_SERVER_ROLE_ELECTION` warning in `GraphManager.initNodeRole()`  
   - `ServerOptions.ENABLE_SERVER_ROLE_ELECTION` config key declaration  
   - Transition-only tests: `testOpenGraphWithDeprecatedTaskSchedulerType` and  
     `testGraphManagerWarnsOnRoleElection`  
     
   ### 2. Role election infrastructure (medium risk — touches `HugeGraph` 
interface)  
   All of the following are dead code — nothing starts the state machine after 
#3082:  
   - `StandardHugeGraph.initRoleStateMachine(Id)` and the 
`roleElectionStateMachine` field  
   - `roleElectionStateMachine()` from the `HugeGraph` interface and 
`HugeGraphAuthProxy`  
   - `GraphManager.initRoleStateMachine()` and 
`GraphManager.supportRoleElection()` (never called)  
   - `StandardRoleListener` class (never instantiated)  
   - `TaskManager.onAsRoleMaster()` / `onAsRoleWorker()` no-ops  
   - `TaskManager.schedulerExecutor` (`task-scheduler-%d`) zombie thread pool 
and `closeSchedulerTx()`  
   - `RoleElectionOptions` config key declarations  
     
   ### 3. `ServerInfoManager` dead persistence path + `HugeServerInfo` deletion 
(medium risk)  
   - `ServerInfoManager.init()` (no-op), `heartbeat()` (no-op), `tx()`, 
`call()`, and the  
     `dbExecutor` field — the live methods (`selfNodeId`, `selfIsMaster`, 
`initServerInfo`, etc.)  
     must be kept since `DistributedTaskScheduler` still uses them  
   - `HugeServerInfo.java` — entire class, including `~server` vertex schema 
and load tracking  
   - `serverInfoDbExecutor` thread pool and `SERVER_INFO_DB_WORKER` constant 
from `TaskManager`  
   - `serverInfoDbExecutor` parameter from `StandardTaskScheduler`, 
`TaskAndResultScheduler`,  
     and `DistributedTaskScheduler` constructors  
   - Update `ServerInfoManagerTest` and `TaskSchedulerServerInfoTest` 
accordingly  
     
   ## Suggested PR split  
     
   | PR | Scope | Risk |  
   |---|---|---|  
   | PR A | Deprecated config warnings + transition tests | Low |  
   | PR B | Role election infrastructure | Medium |  
   | PR C | `ServerInfoManager` surgery + `HugeServerInfo` deletion | Medium |  
     
   ## Important constraints  
   - `ServerInfoManager` itself is **not** deleted — `DistributedTaskScheduler` 
still uses  
     `selfNodeId()` for task lock scoping.  
   - `TaskScheduler.serverManager()` interface method stays for the same 
reason.  
   - `StandardHugeGraph.serverStarted()` must keep the 
`initServerInfo(nodeInfo)` call —  
     only the `initRoleStateMachine(nodeInfo.nodeId())` call is removed.  
   - Before deleting `HugeServerInfo`, audit `HugeVertex.java` for `fromVertex` 
dispatch  
     references and any `initSchemaIfNeeded()` call sites in system init.  
     
   ## Related  
   - #3082
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   ```javascript
   
   ```
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   ```javascript
   
   ```


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

Reply via email to