Course contentsShow
← Computer Science
Lesson 2676 of 2,87259. Consensus and ReplicationFree lesson

Phase 1b: Promise Response

Understanding how acceptors respond to prepare requests with promises and previously accepted values if any.

Phase 1b: Promise Response

You'll learn: How acceptors respond to prepare requests in Paxos by making promises and revealing any previously accepted values.

The Promise Mechanism

When an acceptor receives a prepare request with proposal number n from a proposer (Phase 1a), it must decide whether to make a promise. The acceptor checks if n is higher than any proposal number it has already promised to.

If n is higher, the acceptor:

  1. Promises not to accept any future proposals with numbers less than n
  2. Responds with:
    • The promise acknowledgment
    • The highest-numbered proposal it has previously accepted (if any), along with that proposal's value
    • Or indication that it has never accepted anything

If n is lower than or equal to a previously promised number, the acceptor ignores the request or sends a rejection.

Why Return Previously Accepted Values?

Think of this like a negotiation room where people can only commit to the most recent serious offer. If someone asks "Will you consider my offer #15?", you reply "Yes, but FYI, I already tentatively accepted offer #12 for 'pizza night'." This lets the new proposer know what's already in play and incorporate it.

This mechanism ensures safety: even if earlier proposals partially succeeded, the new proposer learns about them and can preserve values that might have already achieved consensus.

Example Response

An acceptor might respond: "I promise not to accept proposals numbered less than 15. By the way, I previously accepted proposal #10 with value 'replica-3'."

Key Takeaway: Acceptors respond to prepare requests with promises to ignore lower-numbered proposals and reveal any previously accepted proposal-value pairs, ensuring new proposers don't accidentally violate partially established consensus.