You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hexiaoqiao (via GitHub)" <gi...@apache.org> on 2023/08/07 06:13:03 UTC

[GitHub] [hadoop] Hexiaoqiao commented on a diff in pull request #5924: HDFS-17140. Optimize the BPOfferService.reportBadBlocks() method

Hexiaoqiao commented on code in PR #5924:
URL: https://github.com/apache/hadoop/pull/5924#discussion_r1285417874


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java:
##########
@@ -291,10 +291,11 @@ public String toString() {
   void reportBadBlocks(ExtendedBlock block,
                        String storageUuid, StorageType storageType) {
     checkBlock(block);
-    for (BPServiceActor actor : bpServices) {
-      ReportBadBlockAction rbbAction = new ReportBadBlockAction
-          (block, storageUuid, storageType);
-      actor.bpThreadEnqueue(rbbAction);
+    if (!bpServices.isEmpty()) {

Review Comment:
   Could it be empty? What issue do you meet here? Thanks.



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

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


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