yunfengzhou-hub commented on code in PR #23927: URL: https://github.com/apache/flink/pull/23927#discussion_r1433747654
########## flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/storage/TieredStorageConsumerClient.java: ########## @@ -52,33 +55,39 @@ public class TieredStorageConsumerClient { Map<TieredStorageSubpartitionId, Tuple2<TierConsumerAgent, Integer>>> currentConsumerAgentAndSegmentIds = new HashMap<>(); + private final List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs; + public TieredStorageConsumerClient( List<TierFactory> tierFactories, List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs, TieredStorageNettyService nettyService) { this.tierFactories = tierFactories; this.nettyService = nettyService; this.tierConsumerAgents = createTierConsumerAgents(tieredStorageConsumerSpecs); + this.tieredStorageConsumerSpecs = tieredStorageConsumerSpecs; } public void start() { for (TierConsumerAgent tierConsumerAgent : tierConsumerAgents) { tierConsumerAgent.start(); + for (TieredStorageConsumerSpec spec : tieredStorageConsumerSpecs) { + tierConsumerAgent.notifyRequiredSegmentId( Review Comment: In `SingleInputGate#requestPartitions`, a subpartition view is created in `internalRequestPartitions()`, which will be invoked before `TieredStorageConsumerClient#start`. Thus it can be guaranteed that the subpartition view has been created before the first `notifyRequiredSegmentId` is invoked. -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org