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 2021/08/03 16:57:06 UTC

[GitHub] [pulsar] codelipenghui opened a new pull request #11547: Fix data lost when using earliest position to subscribe to a topic

codelipenghui opened a new pull request #11547:
URL: https://github.com/apache/pulsar/pull/11547


   When subscribing to a topic with earliest position, the ManagedLedger always using
   the last position to init the cursor. If the no cursor update happens and the broker restarts
   or topic been unloaded or the topic ownership changed, will lead to the data lost, the unacked messages
   will not redeliver to the consumer again.
   
   The root cause is if we are using the last position to init the cursor, the cursor will update the
   mark delete position as the last position first to the Zookeeper, if the cursor can't a chance to
   update the mark delete position again before been closed, when recoving the cursor again, will using
   the mark delete posiion that stored in the Zookeeper, so the issue happens.
   
   The fix is to add check for the initial position of the cursor, if we are using the Earliest as the initial position,
   use the first position to init the cursor.
   
   The new added test can cover the changes, and without this change, the test would failed.
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] codelipenghui commented on pull request #11547: Fix data lost when using earliest position to subscribe to a topic

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


   @Anonymitaet Sorry, forget to add the label, this is a bug fix, so we don't need make documentation change.


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] codelipenghui commented on pull request #11547: Fix data lost when using earliest position to subscribe to a topic

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


   @Anonymitaet Sorry, forget to add the label, this is a bug fix, so we don't need make documentation change.


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] Anonymitaet commented on pull request #11547: Fix data lost when using earliest position to subscribe to a topic

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


   @codelipenghui Thanks for your contribution. For this PR, do we need to update docs?
   
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? 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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] merlimat merged pull request #11547: Fix data lost when using earliest position to subscribe to a topic

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


   


-- 
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: commits-unsubscribe@pulsar.apache.org

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