synchrone / sandstorm-radicale

A calendars and contacts app for Sandstorm.io
https://apps.sandstorm.io/app/8kr4rvyrggvzfvc160htzdt4u5rfvjc2dgdn27n5pt66mxa40m1h
13 stars 3 forks source link

Non-atomic writes possibly causing (rare) data loss #21

Closed kentonv closed 7 years ago

kentonv commented 8 years ago

We've had two reports of Radicale grains on Oasis spontaneously losing all of their data. I took a look at the storage code and discovered that it is not performing atomic writes, which could explain the problem:

https://github.com/Kozea/Radicale/issues/440

Atomic writes are essential in server-oriented software since machine failures are common. Usually, databases (including sqlite) take care of this automatically, but Radicale looks to be using regular old filesystem storage.

It would be great to get this bug fixed (either upstream or in the Sandstorm branch) and push a new release.

kentonv commented 8 years ago

It looks like https://github.com/Kozea/Radicale/commit/4c91ee8906ce660492ea9957cc85e7180ddf8ae3 fixes the issue upstream. Would it make sense to cherry-pick this into a Sandstorm package update? (It looks like upstream master is not intended to be stable, so a cherry-pick seems like a good idea.)

kentonv commented 8 years ago

Hmm, now there's talk in https://github.com/Kozea/Radicale/issues/440 that this isn't fully fixed yet.

synchrone commented 8 years ago

Okay, as far as I see, this issue is solved except for the claimed Collection.delete method. This app is never intended to delete the collection, so I will start backporting the fix.

synchrone commented 8 years ago

Uploaded to app market as 1.1.1+v12