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/12/02 07:11:20 UTC

[GitHub] [pulsar] 315157973 opened a new pull request #8779: Fix the problem that batchmessage is converted to messageIdImpl

315157973 opened a new pull request #8779:
URL: https://github.com/apache/pulsar/pull/8779


   
   Fixes #8712
   
   ### Motivation
   TopicReaderTest.testHasMessageAvailable is flaky
   Cause Analysis:
   When there is only one message in the batch, calling Broker's `GetLastMessageId` will determine that this is not a batch message, and then return a `MessageIdImpl`. (See ServerCnx line 1553)
   In the same scenario, the client will return a `BatchMessageId` after sending a message. (See ProducerImpl line 1151)
   
   This will happen:
   MessageIdImpl: `3:31:-1`
   BatchMessageId: `3:31:-1:0`
   
   When calling `reader.hasMessageAvailable()`, the two ids will be compared, like this: `lastMessageIdInBroker.compareTo(messageId)`
   Although it is the same messageId, the results will not be equal.
   
   ### Modifications
   When we call `admin.topics().getLastMessageId`, even if there is only one message in the batch, it is considered to be BatchMessageId. Client also acts like this.
   Therefore, we keep consistent everywhere.
   Even if there is only one message in the batch, we think it is `BatchMessageId`
   
   


----------------------------------------------------------------
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] 315157973 commented on pull request #8779: Fix the problem that batchMessageId is converted to messageIdImpl

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


   /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] sijie merged pull request #8779: Fix the problem that batchMessageId is converted to messageIdImpl

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


   


----------------------------------------------------------------
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] 315157973 commented on pull request #8779: Fix the problem that batchMessageId is converted to messageIdImpl

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


   /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] 315157973 commented on pull request #8779: Fix the problem that batchMessageId is converted to messageIdImpl

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


   /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] 315157973 removed a comment on pull request #8779: Fix the problem that batchMessageId is converted to messageIdImpl

Posted by GitBox <gi...@apache.org>.
315157973 removed a comment on pull request #8779:
URL: https://github.com/apache/pulsar/pull/8779#issuecomment-737283638


   /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] 315157973 removed a comment on pull request #8779: Fix the problem that batchMessageId is converted to messageIdImpl

Posted by GitBox <gi...@apache.org>.
315157973 removed a comment on pull request #8779:
URL: https://github.com/apache/pulsar/pull/8779#issuecomment-737280839


   /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] 315157973 commented on pull request #8779: Fix the problem that batchMessageId is converted to messageIdImpl

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


   /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] zymap commented on pull request #8779: Fix the problem that batchMessageId is converted to messageIdImpl

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


   We have a fix of the integration tests. Please rebase your code. Thanks.


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