-
Notifications
You must be signed in to change notification settings - Fork 34
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
rescue if lavinmq starts with faulty msg_store #865
Conversation
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.
Added a couple of comments about log message, otherwise it looks good to me!
Co-authored-by: Jon Börjesson <[email protected]>
Co-authored-by: Jon Börjesson <[email protected]>
rescue ex | ||
@log.error { "Closing message store: invalid SchemaVersion in #{path}" } |
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.
how do we know that it is a "invalid SchemaVersion" error if we catch all errors? aren't we raising a specific exception then? Catch only that then, or log ex.message
.
WHAT is this pull request doing?
today if we get an error when initialising the message store in
load_segments_from_disk
andload_stats_from_segments
we will raise an exception and LavinMQ will not be able to start. With these changes we will instead just close the queue and let LavinMQ start up with closed queues.HOW can this pull request be tested?
try to start up with a faulty msg_store.