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
Background
PR #3082 soft-disabled the pre-PD master-worker scheduling path and intentionally left
deprecated config handling, role-election wiring, and
ServerInfoManagerpersistence ascompatibility 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_typewarning block inStandardHugeGraphENABLE_SERVER_ROLE_ELECTIONwarning inGraphManager.initNodeRole()ServerOptions.ENABLE_SERVER_ROLE_ELECTIONconfig key declarationtestOpenGraphWithDeprecatedTaskSchedulerTypeandtestGraphManagerWarnsOnRoleElection2. Role election infrastructure (medium risk — touches
HugeGraphinterface)All of the following are dead code — nothing starts the state machine after #3082:
StandardHugeGraph.initRoleStateMachine(Id)and theroleElectionStateMachinefieldroleElectionStateMachine()from theHugeGraphinterface andHugeGraphAuthProxyGraphManager.initRoleStateMachine()andGraphManager.supportRoleElection()(never called)StandardRoleListenerclass (never instantiated)TaskManager.onAsRoleMaster()/onAsRoleWorker()no-opsTaskManager.schedulerExecutor(task-scheduler-%d) zombie thread pool andcloseSchedulerTx()RoleElectionOptionsconfig key declarations3.
ServerInfoManagerdead persistence path +HugeServerInfodeletion (medium risk)ServerInfoManager.init()(no-op),heartbeat()(no-op),tx(),call(), and thedbExecutorfield — the live methods (selfNodeId,selfIsMaster,initServerInfo, etc.)must be kept since
DistributedTaskSchedulerstill uses themHugeServerInfo.java— entire class, including~serververtex schema and load trackingserverInfoDbExecutorthread pool andSERVER_INFO_DB_WORKERconstant fromTaskManagerserverInfoDbExecutorparameter fromStandardTaskScheduler,TaskAndResultScheduler,and
DistributedTaskSchedulerconstructorsServerInfoManagerTestandTaskSchedulerServerInfoTestaccordinglySuggested PR split
ServerInfoManagersurgery +HugeServerInfodeletionImportant constraints
ServerInfoManageritself is not deleted —DistributedTaskSchedulerstill usesselfNodeId()for task lock scoping.TaskScheduler.serverManager()interface method stays for the same reason.StandardHugeGraph.serverStarted()must keep theinitServerInfo(nodeInfo)call —only the
initRoleStateMachine(nodeInfo.nodeId())call is removed.HugeServerInfo, auditHugeVertex.javaforfromVertexdispatchreferences and any
initSchemaIfNeeded()call sites in system init.Related