yangzhg commented on a change in pull request #7114: URL: https://github.com/apache/incubator-doris/pull/7114#discussion_r748954668
########## File path: fe/fe-core/src/main/java/org/apache/doris/load/routineload/KafkaProgress.java ########## @@ -149,6 +149,27 @@ public void modifyOffset(List<Pair<Integer, Long>> kafkaPartitionOffsets) throws return pairs; } + // Get the lag of each kafka partition. + // the `partitionIdWithLatestOffsets` is the cached latest offsets of each partition, + // which is periodically updated as job is running. + // The latest offset saved in `partitionIdWithLatestOffsets` is the next offset of the partition, + // And offset saved in `partitionIdToOffset` is the next offset to be consumed. + // For example, if a partition has 4 msg with offsets: 0,1,2,3 + // The latest offset is 4, and offset to be consumed is 2, + // so the lag should be (4-2=)2. Review comment: ```suggestion // so the lag should be 4-2=2. ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org