-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up individually deleted messages before the mark-delete position #14261
Clean up individually deleted messages before the mark-delete position #14261
Conversation
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, the messages get deleted out of order in all cases where the consumer doesn't keep up with the producer. This explains the |
apache#14261) (cherry picked from commit 6d717a0)
apache#14261) (cherry picked from commit 6d717a0)
apache#14261) (cherry picked from commit 5f5b45e)
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 explicitcursor.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.