szetszwo commented on code in PR #1253:
URL: https://github.com/apache/ratis/pull/1253#discussion_r2075899285
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -727,7 +727,7 @@ synchronized void changeToCandidate(boolean
forceStartLeaderElection) {
@Override
public String toString() {
- return role + " " + state + " " + lifeCycle.getCurrentState();
+ return role + "-> " + state + "->" + lifeCycle.getCurrentState();
Review Comment:
How about the following:
```java
return role + " (" + lifeCycle.getCurrentState() + "): " + state;
```
We are already using `->` for representing communications between two
parties, e.g.
```
--
./ratis-client/src/main/java/org/apache/ratis/client/impl/ClientProtoUtils.java
732: return ClientId.valueOf(rpc.getRequestorId()) + "->" +
rpc.getReplyId().toStringUtf8()
1 occurrence(s)
--
./ratis-client/src/main/java/org/apache/ratis/client/impl/OrderedAsync.java
151: return slidingWindows.computeIfAbsent(id, key -> new
SlidingWindow.Client<>(client.getId() + "->" + key));
1 occurrence(s)
--
./ratis-client/src/main/java/org/apache/ratis/client/retry/RequestTypeDependentRetryPolicy.java
79: map.forEach((key, value) ->
b.append(key).append("->").append(value).append(", "));
1 occurrence(s)
--
./ratis-common/src/main/java/org/apache/ratis/protocol/RaftClientMessage.java
65: return JavaUtils.getClassSimpleName(getClass()) + ":" + clientId +
"->" + serverId
1 occurrence(s)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]