[
https://jira.jboss.org/browse/JGRP-1251?page=com.atlassian.jira.plugin.sy...
]
Bela Ban commented on JGRP-1251:
--------------------------------
The issue is caused by B installing an outdated digest sent from A (as part of the state
transfer) and trashing the NakReceiverWindow and creating a new one. Creating a new NRW
means that all existing messages sent by B (but not yet received by A) are lost and cannot
be retransmitted (that's why the error message is seen).
Example:
- B has digest B: 0 5 (5) // lowest stable seqno=0, highest delivered=5, highest
received=5
- B fetches the state from A
- A returns the state plus the digest B: 0 3 (3)
- This means messages B4 and B5 have not yet been seen by A, and are therefore *not yet*
part of the state. In other words, B4-5 have to be delivered *again* by B, even though B
already delivered them !!
- WHY ?
- B delivered B4-5, which caused some state changes
- Then B received and set the state, replacing the existing state
- B's new state (fetched from A) does *not* have messages B4-5 in it, so they need to
be received again by A and B, to come up with the same state !
SOLUTION:
- We *cannot* set B's seqno to 3, as this would have B send *new* (and *different* !)
messages 4 and 5 again !
- We therefore leave B's seqno
- We need to set highest_delivered in B's NRW to 3 though !!
- This causes B to re-deliver messages 4 and 5
NAKACK: overwriteDigest() doesn't adjust sequence number
--------------------------------------------------------
Key: JGRP-1251
URL:
https://jira.jboss.org/browse/JGRP-1251
Project: JGroups
Issue Type: Bug
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 2.10.2, 2.11.1, 2.12
Attachments: GroupCommunication.java, tmp.xml, ViewHandler.java
NAKACK.overwriteDigest() is used by the 2 state transfer protocols (STATE_TRANSFER and
STREAMING_STATE_TRANSFER).
When A has a digest A:250,B:10,C:160, and gets the state (as a result of calling
JChannel.getState() with a digest of A:230,B:10,C:160, it'll set its own digest to
A:230 (from A:250).
However, A's sequence number (seqno) will remain at 250 ! This means, when A sends
the next message, it'll send A:251, but because we set the digest to A:230, A will ask
itself to retransmit messages A:230-250 !
SOLUTION: when receiving digest A:230, A should set its seqno to 230
WORKAROUND: use FLUSH, which doesn't ship digests on state transfer
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira