-
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
Trim deleted entries after recover cursor. #4987
Trim deleted entries after recover cursor. #4987
Conversation
retest this please |
@merlimat @rdhabalia PTAL |
The description is not accurate. The recovered cursor already has the marked individually deleted messages ranges. There is a max set on how many "ranges" to keep (for limiting the amount of memory). Messages that were marked for deletion before the recovery are not being replayed. |
@merlimat I have update the description, please take a look. |
ping @merlimat |
@codelipenghui can you rebase the pull request? |
3259ea3
to
6c0b56b
Compare
@sijie I have rebase the pull request, please take a look. |
run cpp tests |
Change the Milestone to 2.4.2, because of conflict. |
* Trim deleted entries after recover cursor. * Fix errors * Add managed cursor unit tests. * Fix tests and handle cursor reset. * fix unit tests * Fix tests * Fix check style (cherry picked from commit dc7d01e)
* Trim deleted entries after recover cursor. * Fix errors * Add managed cursor unit tests. * Fix tests and handle cursor reset. * fix unit tests * Fix tests * Fix check style (cherry picked from commit dc7d01e)
improved fix is #5894 |
Motivation
The recovered cursor already has the marked individually deleted messages ranges and the last mark delete entry, for messages redelivery, messages that were marked for deletion before the recovery are not being replayed.
But for message delivery, broker will read entries after the last mark delete entry, have not handle
the marked individually deleted messages ranges. This PR will trim messages which are contains in the marked individually deleted messages ranges.
Modification
While the read position of the cursor is less than the upper of LastIndividualDeletedRange, already acked messages are not being dispatched, otherwise not.
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation