New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle version mismatch between clients when syncing #918

Closed
laurent22 opened this Issue Oct 25, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@laurent22
Owner

laurent22 commented Oct 25, 2018

Either by ignoring new fields, or by adding a sync version number and blocking sync until client has been upgraded (to avoid any potential data loss).

https://discourse.joplin.cozic.net/t/unknown-field-fetch-error-on-first-ios-sync/947

https://discourse.joplin.cozic.net/t/joplin-version-1-0-114-error-unknown-field-fetch-error-not-available-for-ios/950/4

@tessus

This comment has been minimized.

Collaborator

tessus commented Oct 25, 2018

I vote for ignoring new fields, otherwise Joplin is never backwards compatible and people are forced to upgrade all systems at the same time.

@tessus

This comment has been minimized.

Collaborator

tessus commented Oct 25, 2018

That is, if I get a vote. ;-)

@laurent22

This comment has been minimized.

Owner

laurent22 commented Oct 25, 2018

Sure, it's open for comments. My reasoning is that if a client sets new properties and other clients skip them when syncing, that could lead to data loss, so in that case in would be better to show a warning and ask the user to upgrade.

@tessus

This comment has been minimized.

Collaborator

tessus commented Oct 25, 2018

I'm not quite sure how using new features could lead to data loss. I mean on the machine with the new features it will always be in the database. When a client with an older database is getting the data via a sync operation this specific feature or data is missing, but it's not lost. It's still on the other machine (in the database) and it's on the sync target. And as soon the database is upgraded the database will have the new data as well. I mean the meta data does not get lost or does it? The files on my nextcloud instance have the meta data at the bottom of the .md files. Clients that can use it shall use it, others that can't shall not.

@tessus

This comment has been minimized.

Collaborator

tessus commented Oct 25, 2018

Another thing I've noticed is: I have upgraded the Android version, but not the iOS or the macOS version, yet I did not see any errors in iOS or macOS. So why would people experience a problem, when updating the desktop app but not the mobile app? So I should see errors or problems in my iOS and macOS app, but I don't. Somehow this makes no sense.

@photonxp

This comment has been minimized.

photonxp commented Oct 27, 2018

Deleted my old thought. Here's the new one:

  • If an old client syncs to a new client, let the new client upgrade the fields to the newer set after receiving data.
  • if a new client syncs to an old client, let the new client downgrade the fields to the older set before sending data.

This means the new clients have to take more responsibilities of the compatibility efforts.

@laurent22 laurent22 closed this in e41896d Oct 31, 2018

@laurent22

This comment has been minimized.

Owner

laurent22 commented Oct 31, 2018

For now I'm skipping unknown properties as in all cases they indeed should be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment