wuchong commented on code in PR #3400:
URL: https://github.com/apache/fluss/pull/3400#discussion_r3386947845


##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorRequestBatch.java:
##########
@@ -409,10 +409,19 @@ private void sendNotifyLeaderAndIsrRequest(int 
coordinatorEpoch) {
                 notifyRequestEntry : notifyLeaderAndIsrRequestMap.entrySet()) {
             // send request for each tablet server
             Integer serverId = notifyRequestEntry.getKey();
+            Set<TableBucket> buckets = notifyRequestEntry.getValue().keySet();
             NotifyLeaderAndIsrRequest notifyLeaderAndIsrRequest =
                     makeNotifyLeaderAndIsrRequest(
                             coordinatorEpoch, 
notifyRequestEntry.getValue().values());
 
+            for (Map.Entry<TableBucket, PbNotifyLeaderAndIsrReqForBucket> 
entry :
+                    notifyRequestEntry.getValue().entrySet()) {
+                int leader = entry.getValue().getLeader();
+                if (leader == serverId || leader == LeaderAndIsr.NO_LEADER) {

Review Comment:
   Why should the NO_LEADER state be included in the pending leader set? Once a 
NO_LEADER bucket is added to this set, it is never cleared upon receiving the 
NotifyLeaderAndIsrResponse. Since we already treat NO_LEADER buckets as 
inactive leaders in 
org.apache.fluss.server.coordinator.CoordinatorContext#isLeaderActive, there is 
no need to handle the NotifyLeaderAndIsr path for NO_LEADER buckets.



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