Skip to content
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
Closed

Handle version mismatch between clients when syncing #918

laurent22 opened this issue Oct 25, 2018 · 7 comments
Labels
bug It's a bug

Comments

@laurent22
Copy link
Owner

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

@laurent22 laurent22 added bug It's a bug essential labels Oct 25, 2018
@tessus
Copy link
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
Copy link
Collaborator

tessus commented Oct 25, 2018

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

@laurent22
Copy link
Owner Author

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
Copy link
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
Copy link
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
Copy link

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
Copy link
Owner Author

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

@lock lock bot locked and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

3 participants