- All Implemented Interfaces:
- TextProtocol.WireFormatable
- Enclosing class:
- Protocol
public class Protocol.Promise
extends TextProtocol.ResponseMessage
Promise response message. It's sent in response to a Propose message.
Note that the "minor" (introduced in 7.1.3) and "id"
(introduced in 18.3.1) part of the suggestion ranking is always tagged on
to the end of the promise request payload. Older pre 7.1.3
(or pre 18.3.1) nodes will ignore extra tokens at the end, since they do
not know about the minor and/or id component of the ranking. This node
will use it if it's present and otherwise use a value of zero for the
minor (VLSN) component and NameIdPair.NULL.id value for the id (node id)
component.
So when comparing rankings across old and new nodes, we are effectively
comparing a Ranking(VLSN, Long.MIN_VALUE) with a Ranking(DTVLSN, VLSN),
resulting in suboptimal election results (from a dtvlsn perspective)
while an upgrade is in progress, that is, it will tend to favor the
older node. But this inaccuracy will vanish once all nodes have been
upgraded.
The Ranking id field is used if the response is from an Arbiter. The
Arbiter's Ranking id field is set to the node identifier corresponding
to the VLSN/DTVLSN. The RN's Ranking id is the node id of the node.
The id field is used so an Arbiters VLSN/DTVLSN will not rank higher than
the value from the RN with that node id.