Skip to content

Fix CQ shared store files not deleted with large messages #13430

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

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

lhoguin
Copy link
Contributor

@lhoguin lhoguin commented Feb 26, 2025

We must consider whether the previous current file is empty (has data written, but was already removed) when writing large messages and opening a file specifically for the large message. If we don't, then the file will never get deleted as we only consider files for deletion when a message gets removed (and there are none).

This is only an issue for large messages. Small messages write a message than roll over to a new file, so there is at least one valid message. Large messages close the current file first, regardless of there being a valid message.

@gomoripeti Please review.

We must consider whether the previous current file is empty
(has data written, but was already removed) when writing
large messages and opening a file specifically for the large
message. If we don't, then the file will never get deleted
as we only consider files for deletion when a message gets
removed (and there are none).

This is only an issue for large messages. Small messages
write a message than roll over to a new file, so there is
at least one valid message. Large messages close the current
file first, regardless of there being a valid message.
@gomoripeti
Copy link
Contributor

great (looks reasonable to me) thank you for finding this subtle bug!

@lhoguin lhoguin marked this pull request as ready for review February 26, 2025 13:25
@lhoguin lhoguin merged commit ea7af39 into main Feb 26, 2025
269 checks passed
@lhoguin lhoguin deleted the loic-fix-fast-large-files-msg-store-delete branch February 26, 2025 13:28
lhoguin added a commit that referenced this pull request Feb 26, 2025
Fix CQ shared store files not deleted with large messages (backport #13430)
lhoguin added a commit that referenced this pull request Feb 26, 2025
Fix CQ shared store files not deleted with large messages (backport #13430) (backport #13432)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants