Skip to content

Commit

Permalink
fix: missing peer id when refreshing leader, #1012
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Oct 20, 2023
1 parent 5a855e0 commit ad6eb5b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,13 @@ public Status refreshLeader(final CliClientService cliClientService, final Strin
"Group %s is not registered in RouteTable, forgot to call updateConfiguration?", groupId);
}
final Status st = Status.OK();
final CliRequests.GetLeaderRequest.Builder rb = CliRequests.GetLeaderRequest.newBuilder();
rb.setGroupId(groupId);
final CliRequests.GetLeaderRequest request = rb.build();

TimeoutException timeoutException = null;
for (final PeerId peer : conf) {
final CliRequests.GetLeaderRequest.Builder rb = CliRequests.GetLeaderRequest.newBuilder();
rb.setGroupId(groupId);
rb.setPeerId(peer.toString());
final CliRequests.GetLeaderRequest request = rb.build();
if (!cliClientService.connect(peer.getEndpoint())) {
if (st.isOk()) {
st.setError(-1, "Fail to init channel to %s", peer);
Expand Down

0 comments on commit ad6eb5b

Please sign in to comment.