You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2026/03/19 10:46:20 UTC

Re: [PR] HDDS-14853. Reduce duplicate logs in ECReconstructionCoordinator#reconstructECBlockGroup [ozone]

ChenSammi commented on code in PR #9941:
URL: https://github.com/apache/ozone/pull/9941#discussion_r2959199909


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ec/reconstruction/ECReconstructionCoordinator.java:
##########
@@ -294,18 +294,20 @@ public void reconstructECBlockGroup(BlockLocationInfo blockLocationInfo,
           sis.setRecoveryIndexes(toReconstructIndexes.stream().map(i -> (i - 1))
               .collect(Collectors.toSet()));
           long length = safeBlockGroupLength;
+          boolean blockGroupDetailsLogged = false;
           while (length > 0) {
             int readLen;
             try {
               readLen = sis.recoverChunks(bufs);
               Set<Integer> failedIndexes = sis.getFailedIndexes();
-              if (!failedIndexes.isEmpty()) {
+              if (!failedIndexes.isEmpty() && !blockGroupDetailsLogged) {

Review Comment:
   failed index will have it's own log when index is added to failedIndexs list, right?  In this case, I would prefer to complete remove following.  
   
   ```
   Set<Integer> failedIndexes = sis.getFailedIndexes();
                 if (!failedIndexes.isEmpty()) {
                   // There was a problem reading some of the block indexes, but we
                   // did not get an exception as there must have been spare indexes
                   // to try and recover from. Therefore we should log out the block
                   // group details in the same way as for the exception case below.
                   logBlockGroupDetails(blockLocationInfo, repConfig,
                       blockDataGroup, readLen, length);
                 }
   ```
   
   



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org