Skip to content

Commit

Permalink
Reduce unnecessary switches
Browse files Browse the repository at this point in the history
  • Loading branch information
LetLetMe committed Oct 29, 2024
1 parent b3edfec commit c78b7f8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3406,10 +3406,11 @@ private CheckRocksdbCqWriteResult doCheckRocksdbCqWriteProgress(ChannelHandlerCo
return result;
}
int successNum = 0;
int checkSize = cqTable.size();
int checkSize = 0;
for (Map.Entry<String, ConcurrentMap<Integer, ConsumeQueueInterface>> topicEntry : cqTable.entrySet()) {
boolean checkResult = processConsumeQueuesForTopic(topicEntry.getValue(), topicEntry.getKey(), rocksDBMessageStore, diffResult, false, requestHeader.getCheckStoreTime());
successNum += checkResult ? 1 : 0;
checkSize++;
}
// check all topic finish, all topic is ready, checkSize: 100, currentQueueNum: 110 -> ready (The currentQueueNum means when we do checking, new topics are added.)
// check all topic finish, success/all : 89/100, currentQueueNum: 110 -> not ready
Expand Down

0 comments on commit c78b7f8

Please sign in to comment.