You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/10/18 10:06:00 UTC

[GitHub] [flink] tisonkun commented on a diff in pull request #21069: [FLINK-29613][Connector/Pulsar] Fix wrong batch size assertion.

tisonkun commented on code in PR #21069:
URL: https://github.com/apache/flink/pull/21069#discussion_r997997897


##########
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/cursor/MessageIdUtils.java:
##########
@@ -55,17 +59,15 @@ public static MessageId nextMessageId(MessageId messageId) {
      * message id. We don't support the batch message for its low performance now.
      */
     public static MessageIdImpl unwrapMessageId(MessageId messageId) {
-        MessageIdImpl idImpl = MessageIdImpl.convertToMessageIdImpl(messageId);
+        MessageIdImpl idImpl = convertToMessageIdImpl(messageId);
         if (idImpl instanceof BatchMessageIdImpl) {
             int batchSize = ((BatchMessageIdImpl) idImpl).getBatchSize();
-            checkArgument(batchSize == 1, "We only support normal message id currently.");
+            checkArgument(
+                    batchSize <= 1,

Review Comment:
   OK. I get the point. So here we should use the condition: `batchSize == 1 || batchSize == 0`?



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org