You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
147822: drpc: move drpc server back to pkg/rpc r=cthumuluru-crdb a=shubhamdhama
`NewRaftTransport` needs a `drpc.Mux` to register its server
implementations, so the straightforward approach is to pass
`drpcServer.Mux`. However, some tests within the `kvserver` package (not
`kvserver_test` itself) also require this `drpcServer.Mux`. This would
necessitate exporting `newDRPCServer` and `drpcServer.mux` as
`NewDRPCServer` and `drpcServer.Mux` respectively. But even then, this
won't resolve the situation; it will introduce a cyclic dependency. Moving
these tests to `kvserver_test` is not a viable option, as they rely on
private methods within `kvserver`. Even if we managed to untangle this
dependency mess, the whole setup just feels wrong and screams for a proper
refactor. We should simply align with how gRPC handles this.
Additionally, as part of this change, it's more appropriate for the DRPC
server implementation residing in `pkg/rpc` to be exposed as an interface
to other packages, rather than as a concrete object.
Epic: CRDB-48925
Release note: None
Co-authored-by: Shubham Dhama <[email protected]>
0 commit comments