Hello,
We tested the scenario with Proton 0.26 and we saw the same behavior. However
it is fixed with your patch as you can see in the log attached.
You can raise a JIRA for the issue. Will the fix be integrated in the next
release ?
Regards,
Ali
-----Original Message-----
From: Gordon Sim <[email protected]>
Sent: mercredi 9 janvier 2019 15:35
To: [email protected]
Subject: Re: Drain issue in proton C++
On 09/01/19 10:28, ali hadi wrote:
> We are currently facing some issues with the drain function in Proton
> C++ 0.22.0 .
>
> We are trying to do synchronous fetch with timeout by doing a drain
> after the timeout expires.
>
> However after the first drain request is done, the drain flag is not
> reset to false causing all the following actions to also request a
> drain from the sender.
Do you see the same behaviour against the latest release (0.26)? If so I would
raise a JIRA for this behaviour, it sounds like a bug.
> We couldn’t find a way to change the drain flag in the
> on_receiver_drain_finish function. Should I create a jira issue ?
I would expect that you would not need to directly change the flag, but that
once you get the on_receiver_drain_finish function the drain 'cycle' is
complete and the flag is no longer set.
Indeed in messaging_adapter.cpp the draining flag on the receiver's context
does appear to be reset:
if (!pn_link_credit(lnk) && lctx.draining) {
lctx.draining = false;
receiver r(make_wrapper<receiver>(lnk));
handler.on_receiver_drain_finish(r);
}
I *think* it may be missing a pn_link_set_drain() as per attached patch.
(Also, shouldn't that be pn_link_remote_credit() in the test? or are they
guaranteed to be the same at this point?)
*******************************
This e-mail contains information for the intended recipient only. It may
contain proprietary material or confidential information. If you are not the
intended recipient you are not authorized to distribute, copy or use this
e-mail or any attachment to it. Murex cannot guarantee that it is virus free
and accepts no responsibility for any loss or damage arising from its use. If
you have received this e-mail in error please notify immediately the sender and
delete the original email received, any attachments and all copies from your
system.
ReceiverClient on_container_start
[0000012D57A3A0E0]: -> AMQP
[0000012D57A3A0E0]:0 -> @open(16)
[container-id="292348be-1884-47e1-8a6c-3dd62cae7252", hostname="localhost",
channel-max=32767]
[0000012D57A3A0E0]:0 -> @begin(17) [next-outgoing-id=0,
incoming-window=2147483647, outgoing-window=2147483647]
[0000012D57A3A0E0]:0 -> @attach(18)
[name="905f4916-f16d-415a-bb41-e926eb01b30b", handle=0, role=true,
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [address="myQueue",
durable=0, timeout=0, dynamic=false], target=@target(41) [durable=0, timeout=0,
dynamic=false], initial-delivery-count=0, max-message-size=0]
[0000012D57A3A0E0]: <- AMQP
[0000012D57A3A0E0]:0 <- @open(16)
[container-id="a51c297e-c548-42df-a42c-a3e8e0ae2356", max-frame-size=262144,
channel-max=255, idle-time-out=0,
offered-capabilities=@PN_SYMBOL[:"ANONYMOUS-RELAY", :"SHARED-SUBS",
:"sole-connection-for-container"], properties={:product="qpid",
:version="7.0.3", :"qpid.build"="62d7ae692b47746c42949c2e646f33a966e6a1a1",
:"qpid.instance_name"="Broker",
:"qpid.virtualhost_properties_supported"="true"}]
[0000012D57A3A0E0]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=0,
incoming-window=8192, outgoing-window=2048]
[0000012D57A3A0E0]:0 <- @attach(18)
[name="905f4916-f16d-415a-bb41-e926eb01b30b", handle=0, role=false,
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [address="myQueue",
durable=0, dynamic=false, default-outcome=@modified(39) [delivery-failed=true],
outcomes=@PN_SYMBOL[:"amqp:accepted:list", :"amqp:released:list",
:"amqp:rejected:list"], capabilities=@PN_SYMBOL[:queue]], target=@target(41)
[durable=0, timeout=0, dynamic=false], unsettled={}, initial-delivery-count=0,
offered-capabilities=@PN_SYMBOL[:"SHARED-SUBS"], properties={}]
ReceiverClient on_connection_open
ReceiverClient on_session_open
ReceiverClient on_receiver_open
first receive
[0000012D57A3A0E0]:0 -> @flow(19) [next-incoming-id=0,
incoming-window=2147483647, next-outgoing-id=0, outgoing-window=2147483647,
handle=0, delivery-count=0, link-credit=1, drain=false]
drain
[0000012D57A3A0E0]:0 -> @flow(19) [next-incoming-id=0,
incoming-window=2147483647, next-outgoing-id=0, outgoing-window=2147483647,
handle=0, delivery-count=0, link-credit=1, drain=true]
[0000012D57A3A0E0]:0 <- @flow(19) [next-incoming-id=0, incoming-window=8192,
next-outgoing-id=0, outgoing-window=2048, handle=0, delivery-count=1,
link-credit=0, available=0, drain=true, echo=false]
ReceiverClient on_receiver_drain_finish
second receive
[0000012D57A3A0E0]:0 -> @flow(19) [next-incoming-id=0,
incoming-window=2147483647, next-outgoing-id=0, outgoing-window=2147483647,
handle=0, delivery-count=1, link-credit=1, drain=false]
close
[0000012D57A3A0E0]:0 -> @close(24) []
[0000012D57A3A0E0]: -> EOS
[0000012D57A3A0E0]:0 <- @close(24) []
[0000012D57A3A0E0]: <- EOS
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]