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

feat(redb): add repair progress #2904

Merged
merged 3 commits into from
Dec 26, 2023
Merged

Conversation

nikicat
Copy link
Contributor

@nikicat nikicat commented Dec 24, 2023

This PR adds progress bar for database repair. It doesn't work smoothly though: due to redb limitation, only 30%, 60% and 90% steps exist.

@casey
Copy link
Collaborator

casey commented Dec 25, 2023

Does this need to be in a background thread? Can we update the progress bar directly in the callback?

@nikicat
Copy link
Contributor Author

nikicat commented Dec 25, 2023

Does this need to be in a background thread? Can we update the progress bar directly in the callback?

We can't because progress callback should be an Fn, not FnMut

@casey
Copy link
Collaborator

casey commented Dec 25, 2023

In that case, try wrapping the progress bar in a Mutex.

@nikicat nikicat force-pushed the feat/repair-progress branch 2 times, most recently from 60c2854 to ff205b9 Compare December 26, 2023 09:19
@casey casey enabled auto-merge (squash) December 26, 2023 20:42
@casey casey merged commit ee2d117 into ordinals:master Dec 26, 2023
6 checks passed
@casey
Copy link
Collaborator

casey commented Dec 26, 2023

Nice, merged!

torkelrogstad pushed a commit to torkelrogstad/ord that referenced this pull request Mar 11, 2024
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