-
Notifications
You must be signed in to change notification settings - Fork 10
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
osiris_log:overview/1 - fix crash with trailing empty index. #168
Conversation
ae1053d
to
a11fd00
Compare
Also delete any segment files that do not have any index files that may have been caused by a process crash during retention deletion. Refactoring around file listings.
a11fd00
to
320f5c9
Compare
81f087b
to
da891c4
Compare
is_file(File) -> | ||
case prim_file:read_file_info(File) of | ||
{ok, #file_info{type = directory}} -> | ||
true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
false? Copy-paste from is_dir()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly. I cannot immediately think of a reason to treat directories as "files" here.
Note that this function is only used in one test in osiris_log_SUITE and it is used with a "regular" file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function can be removed. Apart from being wrong it was copied from Ra and never really used.
Also delete any segment files that do not have any index files that may have been caused by a process crash during retention deletion.
See: rabbitmq/rabbitmq-server#12054
Refactoring around file listings.
Also a fix to segment counter after recovery with an empty log.