Last Message dropped in NAKACK
When a negative acknowledgment scheme (NAK) is used, senders send monotonically increasing sequence numbers (seqnos) and receivers deliver them in the same sequence.
If a gap is detected at a receiver R, R will send a retransmit request to the sender of that message. However, there is a problem: if a receiver R does not receive the last message M sent by P, and P does not send more messages, then R will not know that P sent M and therefore not request retransmission.
This will be the case until P sends another message M'. At this point, R will request retransmission of M from P and only deliver M' after M has been received. Since this may never be the case, or take a long time, the following solution has been adopted:
The JGroupsPbcastSTABLE layer includes an array of the highest seqnos received for each member. When a gossip has been received from each member, the stability vector will be sent by the STABLE layer down the stack to the NAKACK layer. The NAKACK protocol will then do its garbage collection based on the stability vector received. In addition, it will also check whether it has a copy of the highest messages for each sender, as indicated in the stability vector. If it doesn't, it will request retransmission of the missing message(s). A retransmission would only occur if (a) a message was not received and (b) it was the last message.