We go to the effort of keeping a map of the peer's first/last committed
so that we can send the right commits during the first phase of paxos,
but we forgot to record the first value. This appears to simply be an
oversight. It is mostly harmless; it just means we send extra states
that the peer already has.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
return;
}
- // note peer's last_committed, in case we learn a new commit and need to
- // push it to them.
+ // note peer's first_ and last_committed, in case we learn a new
+ // commit and need to push it to them.
+ peer_first_committed[last->get_source().num()] = last->first_committed;
peer_last_committed[last->get_source().num()] = last->last_committed;
if (last->first_committed > last_committed+1) {
*/
version_t accepted_pn_from;
/**
- * @todo Check out if this map has any purpose at all. So far, we have only
- * seen it being read, although it is never affected.
+ * Map holding the first committed version by each quorum member.
+ *
+ * The versions kept in this map are updated during the collect phase.
+ * When the Leader starts the collect phase, each Peon will reply with its
+ * first committed version, which will then be kept in this map.
*/
map<int,version_t> peer_first_committed;
/**