Permalink
Browse files

- Reverted setting seqno on overwriteDigest()

- Setting highest_delivered in win if self
(https://jira.jboss.org/browse/JGRP-1251)
  • Loading branch information...
1 parent 6744277 commit c310792c8527fa7ae155282f9f5afbe2d0e29da2 Bela Ban committed Nov 17, 2010
Showing with 4 additions and 13 deletions.
  1. +4 −13 src/org/jgroups/protocols/pbcast/NAKACK.java
@@ -1187,7 +1187,6 @@ private void overwriteDigest(Digest digest) {
StringBuilder sb=new StringBuilder("\n[overwriteDigest()]\n");
sb.append("existing digest: " + getDigest()).append("\nnew digest: " + digest);
- boolean set_own_seqno=false;
for(Map.Entry<Address, Digest.Entry> entry: digest.getSenders().entrySet()) {
Address sender=entry.getKey();
Digest.Entry val=entry.getValue();
@@ -1199,25 +1198,17 @@ private void overwriteDigest(Digest digest) {
NakReceiverWindow win=xmit_table.get(sender);
if(win != null) {
+ if(local_addr.equals(sender)) {
+ win.setHighestDelivered(highest_delivered_seqno);
+ continue; // don't destroy my onw window
+ }
win.destroy(); // stops retransmission
xmit_table.remove(sender);
- if(sender.equals(local_addr)) { // Adjust the seqno: https://jira.jboss.org/browse/JGRP-1251
- seqno_lock.lock();
- try {
- seqno=highest_delivered_seqno;
- set_own_seqno=true;
- }
- finally {
- seqno_lock.unlock();
- }
- }
}
win=createNakReceiverWindow(sender, highest_delivered_seqno, low_seqno);
xmit_table.put(sender, win);
}
sb.append("\n").append("resulting digest: " + getDigest());
- if(set_own_seqno)
- sb.append("\nnew seqno for " + local_addr + ": " + seqno);
digest_history.add(sb.toString());
if(log.isDebugEnabled())
log.debug(sb.toString());

0 comments on commit c310792

Please sign in to comment.