Sync mode: Lost page changes once client had access to server

I had an issue yesterday where I lost some modification I did on a page. No big deal, I could actually recover most of it. It was a space-script and I could find it in the browser console thanks to a small syntax error in my script.

The step that I think led to the lost note.

  • I worked on my laptop in sync mode (VPN to my LAN was off)
  • Took the train, changed the same note on my phone (VPN was on)
  • Laptop connected to wifi at home and the note updates to content from the phone changes. The note was still open in the client when my laptop resumed from sleep.

I would expect this case to create a conflicted copy but there was nothing to be found.

Is it maybe because the time stamp on the changes was more recent so the client on my laptop considered it to be an update?

This is unfortunate and actually shouldn’t happen. Timestamps are indeed used for detecting conflicts, but don’t rely on ordering. Basically when you sync and the timestamp on the server is different than the last one you saw (last sync) AND you changed it locally too → conflict. Understanding your scenario, this should have happened right?

Were both clients in sync mode?

Yes, both clients were in sync mode. And I would expect a conflict file to be created.

I tried to force the issue but always got a conflicting file…

Now that I think of it, I sometimes get conflicting copies for seemingly no reason while working on a single client. What are other trigger for conflicting copies?

I saw somewhere mentions of possible issues depending on the underlying filesystem.

I’m using btrfs with noatime option (not keeping record of access time). Is that a recipe for disaster with SB?

No it shouldn’t be, access time is not used. A common source of problems is very slow storage.