symious commented on code in PR #1062:
URL: https://github.com/apache/ratis/pull/1062#discussion_r1561951459


##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/LogProtoUtils.java:
##########
@@ -137,8 +137,9 @@ public static LogEntryProto 
removeStateMachineData(LogEntryProto entry) {
   }
 
   private static LogEntryProto 
replaceStateMachineDataWithSerializedSize(LogEntryProto entry) {
-    return replaceStateMachineEntry(entry,
+    LogEntryProto replaced = replaceStateMachineEntry(entry,
         
StateMachineEntryProto.newBuilder().setLogEntryProtoSerializedSize(entry.getSerializedSize()));
+    return copy(replaced);

Review Comment:
   @szetszwo Thank you for the explaination, I misunderstood that 
`LogEntryProto.newBuilder(proto)` will perform a deep copy.



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