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

Merged
merged 1 commit into from Aug 16, 2016

Projects

None yet

3 participants

@kcallin
Contributor
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

@kcallin kcallin [189] Mosquitto database corrupted on power-loss.
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#189
b7ac6c2
@eclipsewebmaster
Contributor
@kcallin
Contributor
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
Contributor
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
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:fixes Aug 16, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
ip-validation
Details
@kcallin kcallin deleted the kcallin:fixes branch Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment