File tree 1 file changed +6
-3
lines changed
ceresdb-protocol/src/main/java/io/ceresdb
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 44
44
45
45
/**
46
46
* A route rpc client which implement RouteMode.Direct
47
- *
47
+ * <p>
48
48
* cached the routing table information locally
49
49
* and will refresh when the server returns an error code of INVALID_ROUTE
50
- *
51
50
*/
52
51
public class RouterClient implements Lifecycle <RouterOptions >, Display , Iterable <Route > {
53
52
@@ -410,7 +409,11 @@ private CompletableFuture<Storage.RouteResponse> invokeRpc(final Storage.RouteRe
410
409
411
410
private Route toRouteObj (final Storage .Route r ) {
412
411
final Storage .Endpoint ep = Requires .requireNonNull (r .getEndpoint (), "CeresDB.Endpoint" );
413
- return Route .of (r .getTable (), Endpoint .of (ep .getIp (), ep .getPort ()));
412
+ if (r .getEndpoint ().getIp ().isEmpty ()) {
413
+ return Route .of (r .getTable (), this .endpoint );
414
+ } else {
415
+ return Route .of (r .getTable (), Endpoint .of (ep .getIp (), ep .getPort ()));
416
+ }
414
417
}
415
418
}
416
419
}
You can’t perform that action at this time.
0 commit comments