You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/10/22 11:33:25 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #8341: [C++] Fix message id error when subscribing a single partition

BewareMyPower opened a new pull request #8341:
URL: https://github.com/apache/pulsar/pull/8341


   ### Motivation
   
   A consumer/reader can subscribe a single partition of a partitioned topic. However, the partition index was not set correctly. So the partition field of received messages' id is always -1.
   
   In addition, current `TopicName#getPartitionIndex` Java implementation doesn't handle some corner cases, like "xxx-partition-00" or "xxx-partition--1". For the backward compatibility, the C++ implementation will use the same implementation and note it in Java `TopicName`'s unit test.
   
   ### Modifications
   
   - Add `getPartitionIndex` method to `TopicName`;
   - Set the partition index when a `Consumer` was created from a `Client`;
   - Set the partition index when a `Reader` was created;
   - Add relative unit tests for above changes;
   - Note the "incorrect" behavior in Java `TopicName`'s unit test.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   
   - `TopicNameTest#testPartitionIndex`
   - `ConsumerTest#testPartitionIndex`
   - `ReaderTest#testPartitionIndex`


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

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



[GitHub] [pulsar] BewareMyPower commented on pull request #8341: [C++] Fix message id error when subscribing a single partition

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #8341:
URL: https://github.com/apache/pulsar/pull/8341#issuecomment-714851288


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] BewareMyPower commented on pull request #8341: [C++] Fix message id error when subscribing a single partition

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #8341:
URL: https://github.com/apache/pulsar/pull/8341#issuecomment-714486804


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] jiazhai merged pull request #8341: [C++] Fix message id error when subscribing a single partition

Posted by GitBox <gi...@apache.org>.
jiazhai merged pull request #8341:
URL: https://github.com/apache/pulsar/pull/8341


   


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

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



[GitHub] [pulsar] jiazhai commented on pull request #8341: [C++] Fix message id error when subscribing a single partition

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #8341:
URL: https://github.com/apache/pulsar/pull/8341#issuecomment-714547780


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] jiazhai commented on pull request #8341: [C++] Fix message id error when subscribing a single partition

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #8341:
URL: https://github.com/apache/pulsar/pull/8341#issuecomment-715333853


   /pulsarbot run-failure-checks


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

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