Permalink
Browse files

setting remove_msgs in NakReceiverWindow.removeMany(): true if discar…

…d_delivered_msgs == true and local_addr != sender
  • Loading branch information...
1 parent a0de30c commit 57275e738c086f821aca96503fcd03adae6ca493 Bela Ban committed Dec 13, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/org/jgroups/protocols/pbcast/NAKACK.java
@@ -827,11 +827,12 @@ private void handleMessage(Message msg, NakAckHeader hdr) {
return;
}
+ boolean remove_msgs=discard_delivered_msgs && !loopback;
boolean released_processing=false;
try {
while(true) {
// we're removing a msg and set processing to false (if null) *atomically* (wrt to add())
- List<Message> msgs=win.removeMany(processing, max_msg_batch_size);
+ List<Message> msgs=win.removeMany(processing, remove_msgs, max_msg_batch_size);
if(msgs == null || msgs.isEmpty()) {
released_processing=true;
return;
@@ -1286,8 +1287,7 @@ private void setDigest(Digest digest, boolean merge) {
private NakReceiverWindow createNakReceiverWindow(Address sender, long initial_seqno, long lowest_seqno) {
- NakReceiverWindow win=new NakReceiverWindow(local_addr, sender, this, initial_seqno, lowest_seqno, timer,
- use_range_based_retransmitter);
+ NakReceiverWindow win=new NakReceiverWindow(sender, this, initial_seqno, lowest_seqno, timer, true);
if(use_stats_for_retransmission) {
win.setRetransmitTimeouts(new ActualInterval(sender));

0 comments on commit 57275e7

Please sign in to comment.