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 <
[hidden email]>
Sent: mercredi 9 janvier 2019 15:35
To:
[hidden email]
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.
---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]