Syncing from Subsurface Mobile after changes made using Desktop - loss of data.

113 views
Skip to first unread message

Michael Werle

unread,
Aug 12, 2020, 8:43:51 AM8/12/20
to Subsurface Divelog
Hi,

I've recently done several dives which I've variously imported into one of several different devices/computers from a Dive Computer.

One particular set of dives were imported (and partially edited) on my Android phone, added some information, sync'd, then sync'd to an Android tablet, where I then entered more detailed notes.  But I forgot to sync those changes back (was away from internet at the time).

Later I edited and renumbered those dives (they hadn't been assigned numbers) as well as added some additional data using my desktop PC (Linux). Later still I imported more dives from another trip, again using a PC (Windows).

When I finally got around to syncing the changes from the tablet, all my detailed notes got overwritten(!).  Prior to doing this sync I was trying to export the dives from the tablet, but the only export options are to divelogs.de and another site. No option to export to a local file (would be nice).


The loss of data is somewhat sub-optimal.  Looking at the git history, it seems the changes from the tablet did get pushed (pfew), but the final merge overwrote them, presumably because the tablet still had the dives "unnumbered" while the repo had them numbered.

I can recover these edits, but for non-technical people this is a bit of an issue (loss of data).


Wbr,
 - Micha.

Dirk Hohndel

unread,
Aug 12, 2020, 1:41:04 PM8/12/20
to subsurfac...@googlegroups.com
Correctly merging out of order changes made from multiple devices is a very hard problem to solve.
Our algorithm to doing this is admittedly fairly simplistic (and I'd be thrilled if someone wanted to improve it, but of course the huge advantage of the way we do this is that no data are ever really lost.

All it takes for a user with this issue is to reach out to me in email, authorize me to access their data, and I can fix things on the backend quite easily.
Since this appears to happen exceptionally rarely, to me this is a fairly solid approach.

/D

Michael Werle

unread,
Aug 12, 2020, 8:35:46 PM8/12/20
to Subsurface Divelog
Thank you Dirk, I appreciate it's no easy task as well as that this is a bit of an edge case.

I think the main issue was that renumbering the dives means the underlying file names changed.  Git is not great at merging changes when files are renamed.

The huge pro to the current approach is that it's easy for humans to browse the data files and find dives. The con, of course, is that the files may get renamed depending on what fields gets changed or when dives get added/removed from trips.

An alternative might be for the files to be named using a guid which remains invarient (unless dives are split or merged) irrespective of what fields are modified - but that would make it more  difficult for identifying dives in the filesystem.

Anyway, I mainly wanted to raise this as it's a potentially scary issue for users as their data is (apparently) lost.  I'm guessing most users will not be aware that contacting you directly is an option.

Wbr,
 - Micha.
Reply all
Reply to author
Forward
0 new messages