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 2022/02/14 03:10:41 UTC

[GitHub] [pulsar] merlimat opened a new pull request #14261: Clean up individually deleted messages before the mark-delete position

merlimat opened a new pull request #14261:
URL: https://github.com/apache/pulsar/pull/14261


   ### Motivation
   
   If there are individually deleted messages that are pointing to *before* the mark-delete position, that will cause a situation in which the `cursor.delete()` calls will fail to move the mark-delete position anymore (at least until an explicit `cursor.markDelete()` is called). 
   
   The problem is that we are comparing the upper-value of the first range and if that is lower, it would be trying to mark-delete an earlier position and get error.


-- 
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 #14261: Clean up individually deleted messages before the mark-delete position

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


   


-- 
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] lhotari commented on pull request #14261: Clean up individually deleted messages before the mark-delete position

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


   This fix reminds me of the issue I was seeing in #10054 with replicated subscriptions. In that case, it seems that because of the "marker messages" [being acknowledged automatically](https://github.com/apache/pulsar/blob/d3465529d33f0bf35fe837444e2216085eecbc5f/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java#L97), the messages get deleted out of order in all cases where the consumer doesn't keep up with the producer. This explains the [`individuallyDeletedMessages` ranges seen when the problem occurs in #10054](https://github.com/apache/pulsar/issues/10054#issuecomment-810919739). When there are `individuallyDeletedMessages` in the subscription, the `markDeletedPosition` doesn't get updated and therefore the subscription state doesn't get replicated.
   @merlimat could this PR help resolve the above scenario?


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