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

[189] Mosquitto database corrupted on power-loss. #206

Merged
merged 1 commit into from
Aug 16, 2016

Conversation

kcallin
Copy link
Contributor

@kcallin kcallin commented Jul 6, 2016

Mosquitto database writes are not atomic and if power is lost during
a write the file will be permanently lost. This commit makes writes as
atomic as possible.

Signed-off-by: Keegan Callin kc@kcallin.net
Bug: #189

Mosquitto database writes are not atomic and if power is lost during
a write the file will be permanently lost.  This commit makes writes as
atomic as possible.

Signed-off-by: Keegan Callin <kc@kcallin.net>
Bug: eclipse-mosquitto#189
@eclipsewebmaster
Copy link

Issue tracker reference:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=189

@kcallin
Copy link
Contributor Author

kcallin commented Jul 6, 2016

Initial tests show that on Linux 4.1 persistence is working as well as it did before the patch. I have two boards in reboot rigs to practically verify that the new (more atomic) write procedure doesn't break as far as we can test. The practical testing will take another ~2 weeks to complete.

I think that the change should be merged if there's any risk of conflicts with other pending changes in the next two weeks. If there's no risk then let's wait for the outcome of the practical tests.

@kcallin
Copy link
Contributor Author

kcallin commented Jul 25, 2016

Mechanical hardware testing is complete. The test rig completed 15k power cycles without failure. Formerly we would see failures in ~1-2k cycles. Recommend merging.

@ralight
Copy link
Contributor

ralight commented Aug 11, 2016

Thanks for this, I don't seem to have had a notification about your last message so only just saw it. I'll see about merging later today.

@ralight ralight merged commit 7ba3f3d into eclipse-mosquitto:fixes Aug 16, 2016
@kcallin kcallin deleted the fixes branch August 31, 2016 15:38
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants