Refactor CoreNodeManager to inherit from CustomNodeManager2 with ICoreNodeManager interface#3429
Refactor CoreNodeManager to inherit from CustomNodeManager2 with ICoreNodeManager interface#3429
Conversation
|
|
…NodeManager as obsolete Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
…it array syntax Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
|
@copilot please add an Interface ICoreNodeManager and make the Server depend on that. Make shure both classes implement this interface, also ensure to include INodeManager2 interface in the ICoreNodeManager interface |
…ce instead of concrete type Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Done! Created |
Proposed changes
CoreNodeManager now inherits from CustomNodeManager2, consolidating the server library's NodeManager implementations into a single architecture. The original CoreNodeManager implementation had no test coverage and used a different internal structure (NodeTable/ILocalNode vs NodeState). An interface-based approach has been introduced to provide better abstraction and flexibility.
Key changes:
ICoreNodeManagerinterface that extendsINodeManager2and defines the contract for core node managersCoreNodeManager2inheriting fromCustomNodeManager2and implementingICoreNodeManagerDataLock,ImportNodes,AttachNode,CreateUniqueNodeId,DynamicNamespaceIndexCoreNodeManageras[Obsolete]but kept functional for backward compatibility (now also implementsICoreNodeManager)MasterNodeManager,IServerInternal,ServerInternalDatato depend onICoreNodeManagerinterface instead of concrete typesTest coverage:
Types of changes
Checklist
Further comments
The refactoring maintains full backward compatibility by keeping the old CoreNodeManager as obsolete. The new implementation uses the same NodeState-based architecture as CustomNodeManager2, making the codebase more maintainable. SamplingGroups support is now enabled in the core node manager as specified in the requirements.
The introduction of
ICoreNodeManagerinterface provides better separation of concerns and allows the server infrastructure to depend on abstractions rather than concrete implementations, following SOLID principles. Both the deprecatedCoreNodeManagerand the newCoreNodeManager2implement this interface, ensuring a smooth transition path.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.