[ 
https://issues.apache.org/jira/browse/PROTON-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466808#comment-13466808
 ] 

Ted Ross commented on PROTON-40:
--------------------------------

I've lowered the priority of this issue to minor.

There's a subtlety in the engine API that causes problems in the work sequence 
for a receiver link.  This is either a bug of a documentation issue.  
Specifically, if an application is processing inbound messages on a link and it 
invokes pn_settle before calling pn_advance, the queued count (on the link) 
decrements twice and a delivery is lost.

The lack of batching of dispositions remains true but it is now an opportunity 
for optimization rather than a data-loss issue.

Here's an updated trace:

[0x181da90:1] -> TRANSFER @20 [1, 0, b"\x00\x00\x00\x00\xff\x7f\x00\x00", 0, 
false, false] (183) "..."
[0x181da90:1] -> TRANSFER @20 [1, 1, b"\x01\x00\x00\x00\xff\x7f\x00\x00", 0, 
false, false] (183) "..."
[0x181da90:1] -> TRANSFER @20 [1, 2, b"\x02\x00\x00\x00\xff\x7f\x00\x00", 0, 
false, false] (183) "..."
[0x181da90:1] <- FLOW @19 [3, 1021, 0, 1024, 1, 3, 8, null, false]
[0x181da90:1] <- DISPOSITION @21 [true, 0, 0, true, @36 []]
[0x181da90:1] <- DISPOSITION @21 [true, 1, 1, true, @36 []]
[0x181da90:1] <- DISPOSITION @21 [true, 2, 2, true, @36 []]

                
> Batching of message IDs in Disposition frames not supported
> -----------------------------------------------------------
>
>                 Key: PROTON-40
>                 URL: https://issues.apache.org/jira/browse/PROTON-40
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>            Reporter: Ted Ross
>            Priority: Minor
>
> If a proton client calls pn_disposition on more than one received delivery 
> between the sending of disposition frames, the next disposition frame will 
> reference only the first message in the batch.
> Ref:  This code fragment from pn_post_disp which uses the same value for 
> first and last id:
>     return pn_post_frame(transport->disp, ssn_state->local_channel, 
> "DL[oIIo?DL[]]", DISPOSITION,
>                          link->endpoint.type == RECEIVER, state->id, 
> state->id,
>                          delivery->local_settled,
>                          (bool)code, code);
> The result of this is that dispositions for messages are lost and senders 
> hang if there are credit windows of greater than one.  It would be ok, but 
> inefficient, to send multiple singleton dispositions.  In fact, proton simply 
> skips one or more disposition so the settlement of messages is incomplete.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to