Repository navigation
daemon: expose NodeServiceImpl::node_service() accessor (unblocks Pro multi-DB routing) - #1710
Merged
Merged
Conversation
Adds a public accessor returning the underlying Arc<NodeService> a NodeServiceImpl serves. Lets a caller that opens a database through the DatabaseManager reuse the same NodeService the gRPC handlers serve — e.g. the Pro daemon binding cloud-sync to the manager's default database instead of constructing a second store on the same file (single-writer contention). Co-Authored-By: Claude Opus 4.8 <[email protected]>
Contributor
Author
|
APPROVE — purely additive accessor: returns |
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
NodeServiceImpl::node_service(&self) -> Arc<NodeService>— a public accessor for the underlyingNodeServicethe gRPC impl serves.Why
Foundation for the Pro daemon multi-database routing work (nodespace-sync#327, ADR-053). When
nodespaced-proopens its default database through theDatabaseManager(sox-ns-database-idrouting works anddatabase listreports it open), cloud-sync must bind to the sameNodeServicethe router's handlers serve. The manager's bundle (DatabaseServices) only exposednode_service_grpc: NodeServiceImpl, and its innernode_servicewas private — so cloud-sync couldn't reuse it and would otherwise construct a secondNodeServiceon the same file (single-writer contention). This accessor closes that gap.Test
Added
node_service_accessor_returns_the_same_underlying_service— assertsArc::ptr_eqbetween the accessor's result and the service passed tonew. Pre-push gate (test:all + Rust) green.No behavior change for existing callers; purely additive.