Conflict-Free Replicated Data Types · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

Merge rules that make replicas agree

Computing · Data & Databases · ages 22-24
Name ______________________   Date ____________
  1. Replica A counted 2 adds and replica B counted 3 adds. Type the merged counter value.

    Answer: ______________

  2. Replicas receive the same updates in different orders. What makes them converge?

    • A merge that erases order: commutative, associative, idempotent
    • A faster network between replicas
    • A leader that reorders all updates
  3. With a concurrent add and remove of one element, the merge rule decides the outcome.

    Circle one:   True   False

  4. A set uses add-wins. An add and a remove of one photo race. What does every replica show?

    • The photo is absent everywhere
    • Each replica keeps its own answer
    • The photo is present everywhere
  5. The same add arrives at a replica twice. What is the effect of the duplicate?

    • It corrupts the replica state
    • It counts twice
    • Nothing, it folds into the same state
  6. Why can these replicas accept writes with no coordination?

    • Writes are never stored durably
    • Conflicts are settled later by the merge
    • Networks never reorder their messages
  7. A block list must never show a blocked account, even if an unblock raced a block. Which rule fits?

    • Add-wins, to keep entries longer
    • Remove-wins, so the block survives races
    • Last-writer-wins by wall clock
  8. Kim says her merged set always matches what the users intended. What is wrong?

    • Merges are always too slow to matter
    • The rule picks mechanically and may surprise everyone
    • Replicas can never actually converge
LightMySky · lightmysky.comW1-mt_Bhf1nu-9jz-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Merge rules that make replicas agree W1-mt_Bhf1nu-9jz-s1

  1. 5 · Merging sums the per-replica slots: 2 plus 3.
  2. A merge that erases order: commutative, associative, idempotent · The merge properties make arrival order irrelevant.
  3. True · The rule, not the users, settles the race.
  4. The photo is present everywhere · Add-wins keeps the element on every replica.
  5. Nothing, it folds into the same state · Idempotence makes repeats harmless.
  6. Conflicts are settled later by the merge · Accept now, reconcile at merge time.
  7. Remove-wins, so the block survives races · Remove-wins drops the entry whenever a remove raced.
  8. The rule picks mechanically and may surprise everyone · Convergence promises agreement, not intent.
Worksheet · LightMySky