Drain issue in proton C++

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Drain issue in proton C++

ali hadi

Hello,

 

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.

 

We couldn’t find a way to change the drain flag in the on_receiver_drain_finish function. Should I create a jira issue ?

 

You can find attached an example with a simple receiver trying to consume from a Qpid Java Broker 7.0.3 with no messages, and the log file with the  PN_TRACE_FRM activated.

 

Regards,

Ali



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

test_case.cpp (4K) Download Attachment
simple_receiver_log.txt (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Drain issue in proton C++

Gordon Sim
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?)



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

drain.patch (576 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Drain issue in proton C++

HADI Ali
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]

receiver_drain_log.txt (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Drain issue in proton C++

Gordon Sim
On 14/01/19 10:31, HADI Ali wrote:
> 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 ?

https://issues.apache.org/jira/browse/PROTON-1990, yes I hope/expect it
will be.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Drain issue in proton C++

HADI Ali
Hello,

Do you have an idea when Proton 0.27 is planned to be released ?
We are particularly interested in the drain issue.

Thanks,
Ali

-----Original Message-----
From: Gordon Sim <[hidden email]>
Sent: lundi 14 janvier 2019 13:02
To: [hidden email]
Subject: Re: Drain issue in proton C++

On 14/01/19 10:31, HADI Ali wrote:
> 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 ?

https://issues.apache.org/jira/browse/PROTON-1990, yes I hope/expect it will be.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email]

*******************************
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]

Reply | Threaded
Open this post in threaded view
|

Re: Drain issue in proton C++

Justin Ross-3
Hi, Ali.  We're currently planning to kick off a release in the first week
of February.

On Mon, Jan 21, 2019 at 6:09 AM HADI Ali <[hidden email]> wrote:

> Hello,
>
> Do you have an idea when Proton 0.27 is planned to be released ?
> We are particularly interested in the drain issue.
>
> Thanks,
> Ali
>
> -----Original Message-----
> From: Gordon Sim <[hidden email]>
> Sent: lundi 14 janvier 2019 13:02
> To: [hidden email]
> Subject: Re: Drain issue in proton C++
>
> On 14/01/19 10:31, HADI Ali wrote:
> > 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 ?
>
> https://issues.apache.org/jira/browse/PROTON-1990, yes I hope/expect it
> will be.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email] For additional
> commands, e-mail: [hidden email]
>
> *******************************
> 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]
>
>