wuchong commented on code in PR #2145:
URL: https://github.com/apache/fluss/pull/2145#discussion_r2609684301


##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/statemachine/ReplicaStateMachine.java:
##########
@@ -376,12 +380,16 @@ private void logInvalidTransition(
     }
 
     private void logFailedSateChange(
-            TableBucketReplica replica, ReplicaState currState, ReplicaState 
targetState) {
+            TableBucketReplica replica,
+            ReplicaState currState,
+            ReplicaState targetState,
+            Throwable reason) {
         LOG.error(
                 "Fail to change state for table bucket replica {} from {} to 
{}.",
                 stringifyReplica(replica),
                 currState,
-                targetState);
+                targetState,
+                reason);

Review Comment:
   We previously only logs the exception message, however, the new version 
prints the full stack of the exception which may make the error message complex 
and verbose. However still keeping log error message? In this way, we can also 
simplify the method without creating an Exception object for it. 



-- 
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]

Reply via email to