Skip to content

Commit

Permalink
UNICAST3.removeAndDeliver() batch.multicast should be false (was true)
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Dec 6, 2024
1 parent c367a38 commit 213966c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/org/jgroups/protocols/ReliableUnicast.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ public abstract class ReliableUnicast extends Protocol implements AgeOutCache.Ha

protected final Map<Address,SenderEntry> send_table=Util.createConcurrentMap();
protected final Map<Address,ReceiverEntry> recv_table=Util.createConcurrentMap();
/** To cache batches for sending messages up the stack (https://issues.redhat.com/browse/JGRP-2841) */
/** To cache batches for sending messages up the stack (https://issues.redhat.com/browse/JGRP-2841).
* Note: values are all _regular_ batches; OOB batches/messages have been passed up, or were removed when
* draining the table in removeAndDeliver() */
protected final Map<Address,MessageBatch> cached_batches=Util.createConcurrentMap();

protected final ReentrantLock recv_table_lock=new ReentrantLock();
Expand Down
2 changes: 1 addition & 1 deletion src/org/jgroups/protocols/UNICAST3.java
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ protected void removeAndDeliver(Table<Message> win, Address sender, AsciiString
AsciiString cl=cluster != null? cluster : getTransport().getClusterNameAscii();
int cap=Math.max(Math.max(Math.max(win.size(), max_batch_size), min_size), DEFAULT_INITIAL_CAPACITY);
MessageBatch batch=reuse_message_batches && cl != null?
cached_batches.computeIfAbsent(sender, __ -> new MessageBatch(cap).dest(local_addr).sender(sender).cluster(cl).mcast(true))
cached_batches.computeIfAbsent(sender, __ -> new MessageBatch(cap).dest(local_addr).sender(sender).cluster(cl))
: new MessageBatch(cap).dest(local_addr).sender(sender).cluster(cl).multicast(true);
batch.array().increment(DEFAULT_INCREMENT);
Supplier<MessageBatch> batch_creator=() -> batch;
Expand Down

0 comments on commit 213966c

Please sign in to comment.