Giter Site home page Giter Site logo

Disable sync lock support about joplin HOT 4 OPEN

laurent22 avatar laurent22 commented on July 18, 2024
Disable sync lock support

from joplin.

Comments (4)

roman-r-m avatar roman-r-m commented on July 18, 2024

all operations are atomic

what about this scenario?

  1. client A reads a note from the server, sees it hasn't been updated
  2. before it can update the note, client B pushes its changes
  3. client A pushes its change overwriting B's update

but then, i don't think a sync lock would've prevented it anyway

from joplin.

laurent22 avatar laurent22 commented on July 18, 2024

You're right, I don't think we support this. The individual write/delete operations are atomic but checking some info, then writing something based on it is not. I guess it's never been a problem since it would require changes to be made almost at the exact same time on two different clients. And indeed the sync locks would not help with this.

from joplin.

roman-r-m avatar roman-r-m commented on July 18, 2024

tbh, i think sync should just lock the whole thing like the exclusive lock does, it'd make reasoning about sync much easier
yes it'd prevent multiple clients from syncing at the same time so what

from joplin.

laurent22 avatar laurent22 commented on July 18, 2024

Reasoning about sync, maybe, but it also brings extra complexity especially when things don't go as expected. We need to ensure sync locks can expire, but we also need to make sure they don't expire too quickly so that someone with a slow connection doesn't get locked out. Also if you import a huge ENEX file for example and sync it on desktop, meanwhile you can't use your phone at all to sync your notes.

There are probably other potential issues we aren't familiar with (since we never tried to make sync lock exclusive) and it's possible we'd simplify thing on one side but make it more complex on another side.

from joplin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.