wenbingshen commented on code in PR #3833:
URL: https://github.com/apache/bookkeeper/pull/3833#discussion_r1184799465


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerFragment.java:
##########
@@ -229,15 +229,16 @@ public void setReplicateType(ReplicateType replicateType) 
{
     @Override
     public String toString() {
         return String.format("Fragment(LedgerID: %d, FirstEntryID: %d[%d], "
-                + "LastKnownEntryID: %d[%d], Host: %s, Closed: %s)", ledgerId, 
firstEntryId,
+                + "LastKnownEntryID: %d[%d], Host: %s, Closed: %s, Type: %s)", 
ledgerId, firstEntryId,
                 getFirstStoredEntryId(), lastKnownEntryId, 
getLastStoredEntryId(),
-                getAddresses(), isLedgerClosed);
+                getAddresses(), isLedgerClosed, replicateType);
     }
 
     /**
      * ReplicateType.
      */
     public enum ReplicateType {
+        NULL,

Review Comment:
   @horizonzy I understand what you mean enough now, I misunderstood earlier, I 
understood replicateType as a piecemeal state, as you said, it does not 
represent state.
   
   Now I want to add replicateType to the toString method of LedgerFragment. 
When the user opens the debug logger, we can see this situation:
   
![image](https://user-images.githubusercontent.com/35599757/236170294-9b18e4bc-64f3-4472-9aae-d51f9e9129c3.png)
   
   When checking a fragment, the fragment replicateType is DATA_LOSS, which may 
be a bit strange for users.
   
   This is only a small ambiguity here, but I think it is not a big problem 
now, we keep DATA_LOSS and DATA_NOT_ADHERING_PLACEMENT enough, it does not 
affect the result of program execution.
   



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