Consistency Models and the CAP Trade-off · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.
به انگلیسی

Replica agreement during a network split

Computing · Networks & Security · ages 20-22
Name ______________________   Date ____________
  1. In an eventually consistent store, updates stop and communication and reconciliation succeed. What is promised?

    • The replicas eventually converge to an agreed state
    • The replicas retain their conflicting states forever
    • The replicas erase every update accepted during the split
  2. A write completes before a read begins. No later write occurs. Under linearizability, what must the read return?

    • The earlier value stored before the completed write
    • The value supplied by the completed write
    • Any value chosen from the replica's stored history
  3. Despite network partitions that may persist indefinitely, a store can guarantee linearizability and successful eventual responses to every request received by a non-failing node.

    Circle one:   True   False

  4. An available basket accepts additions on both sides of a split. Its policy merges item sets by union. R adds tea and S adds rice. What follows after reconciliation?

    • The basket must discard tea to restore one-copy behaviour
    • The basket contains tea and rice under the stated policy
    • The basket must discard rice because it was added at S
  5. Isolated replicas hold 2. R completes a write of 8 before S receives a read. No later write occurs. Which response preserves linearizability?

    • S returns 2 because its local copy has not changed
    • S returns 2 and repairs the answer after reconnection
    • S waits or refuses rather than returning its stale 2
  6. A basket tolerates stale views under a merge policy. A debit must never overdraw an account. How should the team choose guarantees?

    • Match each feature's operations to the rules it must preserve
    • Apply the basket's merge policy to every account debit too
    • Let every replica debit freely and repair overdrafts afterward
  7. A team promises that eventual consistency alone makes every replica agree within one second of reconnection. What is missing?

    • A rule requiring replicas to reject every read after reconnection
    • A separate bound on communication and reconciliation time
    • A rule requiring clients to stop using all replica addresses
  8. Two buyers each read a seat count of 1 before either writes 0. Every separate read and write is linearizable. What prevents both buyers reserving the seat?

    • Repeat the separate reads until both buyers see the value 1
    • Merge the two writes of 0 after both reservations finish
    • Make checking and reserving the seat one atomic operation
LightMySky · lightmysky.comW1-mt_j6qtpYPHsr-s1

Answer key

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

Replica agreement during a network split W1-mt_j6qtpYPHsr-s1

  1. The replicas eventually converge to an agreed state · Eventual consistency promises convergence under these conditions, not agreement at every moment.
  2. The value supplied by the completed write · Real-time order places the completed write before the later read.
  3. False · These are CAP's consistency and availability guarantees. A store cannot guarantee both despite partitions.
  4. The basket contains tea and rice under the stated policy · Union retains both additions. This result depends on the stated merge policy, not on eventual consistency alone.
  5. S waits or refuses rather than returning its stale 2 · The later read must reflect the completed write of 8. S cannot return its stale value while claiming linearizability.
  6. Match each feature's operations to the rules it must preserve · The basket permits stale views. The debit needs a design that prevents overspending instead of repairing it later.
  7. A separate bound on communication and reconciliation time · Eventual consistency supplies no fixed convergence deadline. A one-second promise needs additional timing guarantees.
  8. Make checking and reserving the seat one atomic operation · Linearizable individual operations still permit both reads before either write. An atomic check-and-reserve prevents that race.
Worksheet · LightMySky