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

ASF subversion and git services commented on DISPATCH-1751:
-----------------------------------------------------------

Commit 5371dfbedc60fd6c429c237d7053c3e15f0d25fe in qpid-dispatch's branch 
refs/heads/master from Charles E. Rolke
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=5371dfb ]

DISPATCH-1751: Fix 32-bit self test receiving unexpected incoming-capacity

Dispatch listener config defines a 'maxFrameSize' and a 'maxSessionFrames'.
The idea is to have the 'maxFrameSize' go out in AMQP Open frames as
'max-frame-size' and the 'maxSessionFrames' go out in AMQP Begin frames
as 'incoming-capacity'.

To accomplish this Proton accepts a maxFrameSize and a capacity.
For Dispatch to get Proton to emit the 'incoming-capacity' then Dispatch
must specify 'capacity' as the product of 'maxFrameSize' and
'maxSessionFrames'. Furthermore, Proton specifies the capacity value
as a system-dependent 'size_t' value type.

For 64-bit systems the chosen defaults work just fine although the
capacity is a huge 30+ Terabytes. For 32-bit systems the 30+ Tb number
does not work since that does not fit into a 32-bit size_t. Dispatch
uses a smaller fallback maximum for 32-bit systems.

The self test was failing on 32-bit systems because the self test did not
account for the 32-bit smaller fallback maximum.

This patch fixes the self test to account for the fallback maximum on
32-bit systems.

This patch also rewrites for readability the 32-bit/64-bit capacity
calculations in the mission C code. It also computes capacity values
using 64-bit numbers even on 32-bit systems to avoid size_t overflow
truncation errors.

This patch does *not* use a different strategy for driving Proton to
use simpler calculation methods when essentially unlimited capacity
values are in effect.

Future work in this area might address some of the issues brought up
during Pull Request reviews. Thank you to the reviewers!

* Modify Proton to accept an 'incoming-capacity' value instead of or
in addition to 'capacity'.

* Modify Dispatch not to set a capacity at all in Proton when no flow
control in effect.

This closes #890


> unexpected incoming-window in begin frame when running Dispatch on 32 bit 
> system
> --------------------------------------------------------------------------------
>
>                 Key: DISPATCH-1751
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1751
>             Project: Qpid Dispatch
>          Issue Type: Bug
>    Affects Versions: 1.13.0
>            Reporter: Ganesh Murthy
>            Priority: Major
>             Fix For: 1.15.0
>
>
> On 32bit systems, an unexpected incoming-window value is set. This for 
> example causes system_tests_protocol_settings failures on 32bit systems, with 
> test expecting to see the incoming-window be 2147483647 but instead finding 
> it much less, e.g 131071.
> This is due to the way the session capacity is configured, particularly on 
> 32bit systems. See more details (output, code, etc) from prior discussions on 
> PROTON-2255 (raised when this was incorrectly thought to be a proton issue).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to