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

Merging of conflicting edits after going online #244

Open
dumblob opened this issue Jun 14, 2022 · 2 comments
Open

Merging of conflicting edits after going online #244

dumblob opened this issue Jun 14, 2022 · 2 comments

Comments

@dumblob
Copy link

dumblob commented Jun 14, 2022

Hi, this looks like something I am looking for for over 4 years now! A wiki-like offline-first mobile-first notes & pics & anything_visual taking app.

I wonder how you solve merge conflicts in case two devices (e.g. smartphones) went offline having both the very same revision of the DB data. Then on both devices you will make mutually incompatible - i.e. conflicting - edits (both independently changing the revision of the DB) and then both devices will turn online again (in arbitrary sequence).

Feel free to elaborate. Thanks!

@quolpr
Copy link
Owner

quolpr commented Jun 14, 2022

Hi!

Actually I am going to freeze my project for the better time 😓 I don't have enough time/money to keep working on it, and I got a job at Remnote.

I will be working on just random bag fixes, but no new features/improvements.

As for the merge conflict resolving — last write wins. But at also merge nodes for the same parent. Like:

Client 1:

- A
  - B
  - C
  - new: F

Client 2:

- A
  - B
  - C
  - new: D

After resolve they will be merged to:

- A
  - B
  - C
  - D
  - F

The worse case — if A was deleted on client 1, on client 2 it will be deleted too even if you are some new children.
To avoid such case I was planning to add time travel, so you can travel to any state of the block note at a time.

@quolpr quolpr mentioned this issue Jun 14, 2022
@dumblob
Copy link
Author

dumblob commented Jun 14, 2022

To avoid such case I was planning to add time travel, so you can travel to any state of the block note at a time.

Yep, if combined with an alert that there were conflicting writes, it should be enough for the beginning 😉.

Feel free to close this issue as I myself do not plan to implement this support (also due to lack of time 😢) or leave it open for potentially intersted devs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants