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

Unresolvable edit conflict scenario #303

Open
enikao opened this issue Aug 9, 2024 · 0 comments
Open

Unresolvable edit conflict scenario #303

enikao opened this issue Aug 9, 2024 · 0 comments
Labels

Comments

@enikao
Copy link
Contributor

enikao commented Aug 9, 2024

Model state at start, synchronized between client 1, client 2, and repo

  • Node A
    • [contains] Node B
  • Node C [parallel to A]

Described below as

  • A
    • B
  • C

1. Based on start state, client 1 moves A under C

results in model state:

  • C
    • A
      • B

2. Based on start state, client 2 moves C under B

results in model state:

  • A
    • B
      • C

3. Repo handles both commands

Variant a: Repository chooses one command, discards the other

sends event "moved C under B", resulting in:

  • A
    • B
      • C

Effectively discarding client 1's command, applying client 2's command.

Variant b: Applies both updates with additional conflict resolution event

  1. sends event "moved A under C", resulting in:

    • C
      • A
        • B
  2. sends conflict resolution event "moved C next to A" (not sent by any client, invented by repo to resolve conflict), resulting in:

    • A
      • B
    • C
  3. sends event "moved C under B", resulting in:

    • A
      • B
        • C

Variant c: Just apply in order

  1. sends event "moved A under C", resulting in:

    • C
      • A
        • B
  2. refuses command from client 2

@enikao enikao added the delta label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant