rmetzger commented on a change in pull request #6594: [FLINK-9311] [pubsub] Added PubSub source connector with support for checkpointing (ATLEAST_ONCE) URL: https://github.com/apache/flink/pull/6594#discussion_r257317087
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/MessageAcknowledgingSourceBase.java ########## @@ -148,16 +149,12 @@ public void initializeState(FunctionInitializationContext context) throws Except if (context.isRestored()) { LOG.info("Restoring state for the {}.", getClass().getSimpleName()); - List<SerializedCheckpointData[]> retrievedStates = new ArrayList<>(); + List<Map<Long, Set<UId>>> retrievedStates = new ArrayList<>(); for (SerializedCheckpointData[] entry : this.checkpointedState.get()) { - retrievedStates.add(entry); + retrievedStates.add(SerializedCheckpointData.toDeque(entry, idSerializer)); } + pendingCheckpoints = SerializedCheckpointData.combine(retrievedStates); - // given that the parallelism of the function is 1, we can only have at most 1 state Review comment: @aljoscha @kl0u Can you guys take a look at these changes here? I'm pretty sure there's a fundamental reason why this source only supports a parallelism of 1. I don't want to spend the time understanding exactly how this source base works, if you guys can briefly clarify if this change makes sense or not. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services