Skip to content
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

Catch errors when initializing message_store #707

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

kickster97
Copy link
Member

@kickster97 kickster97 commented Jun 18, 2024

WHAT is this pull request doing?

This PR adds that we catch error when reading segments, to let LavinMQ start up even if we have corrupted messages in a msg_store segment.
It introduces open to queue.cr, which allows you to manually try to open the queue again after solving the errors. (you no longer have to restart LavinMQ)

Also improves the logging by logging the reason of closing the queue/message_store, then saves the exception as @closed_reason in queue and message_store and exports it to the ui via details_tuple

Have some polishing to do, but the basic idea is there so i thought i'd open the pr to get some feedback
TODO: make UI make sense
wip
image

HOW can this pull request be tested?

there is a spec for the open method

@kickster97 kickster97 changed the title Begginning of QueueState::Error QueueState::Error Jun 18, 2024
@kickster97 kickster97 changed the title QueueState::Error Introduce QueueState::Error Jun 18, 2024
@kickster97 kickster97 force-pushed the error-state-for-queues branch 2 times, most recently from 92f6dad to e268a1c Compare June 19, 2024 14:54
@kickster97 kickster97 changed the title Introduce QueueState::Error Catch errors when initializing message_store Jun 20, 2024
@kickster97 kickster97 marked this pull request as ready for review June 25, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants