[
https://issues.jboss.org/browse/JGRP-2172?page=com.atlassian.jira.plugin....
]
Bela Ban commented on JGRP-2172:
--------------------------------
A minor change in semantics wrt non-blocking flow control versus blocking flow control: if
sender P sends messages 1 (700K) and 2 (300K), then blocking flow control guarantees that
P1 is sent first down the stack into UNICAST3 land where it gets a seqno, then P2. Thus,
P1 will be delivered before P2.
However, these semantics are not guaranteed with non-blocking flow control: if we for
example have 500K left, then P1 (700K) will be queued and the call returns so that P can
send message 2. P2 (300K) will be sent successfully, but P1 will only get sent once we get
new credits from the destination member. This means P2 may get delivered before P1.
Typically this is not a problem as P1 and P2 are probably unrelated, or else P would wait
for a response to P1 before sending P2 (e.g. a GET request, then a GET response and -
based on the response - a PUT request).
Just wanted to point this out.
Non-blocking flow control
-------------------------
Key: JGRP-2172
URL:
https://issues.jboss.org/browse/JGRP-2172
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 4.0.4
Sending a message through FlowControl (UFC, MFC) should not block if
{{Message.Flag.NB_FC}} (non-blocking flow control) is set.
Instead, the message should be added to a queue (bounded if {{max_size}} > 0, else
unbounded). The max queue size is given in bytes, so we can estimate what the memory
penalty for reaching that size would be (if bounded).
The queued messages are sent when credits arrive. TBD: when credits arrive, should
blocked threads or queued messages be released first?
Non-blocking flow control can be used by both external and internal threads.
If the queue is unbounded, then it is the responsibility of the application (e.g.
Infinispan) to make sure the queue doesn't grow to an untenable size.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)