[ https://issues.apache.org/jira/browse/DISPATCH-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16987273#comment-16987273 ]
ASF GitHub Bot commented on DISPATCH-1496: ------------------------------------------ codecov-io commented on issue #636: DISPATCH-1496: Reset link variables after the drain is complete. Also… URL: https://github.com/apache/qpid-dispatch/pull/636#issuecomment-560187516 # [Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/636?src=pr&el=h1) Report > Merging [#636](https://codecov.io/gh/apache/qpid-dispatch/pull/636?src=pr&el=desc) into [master](https://codecov.io/gh/apache/qpid-dispatch/commit/9f7bb192e57019385296808fdb2f5c1edf03f909?src=pr&el=desc) will **increase** coverage by `0.03%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/apache/qpid-dispatch/pull/636/graphs/tree.svg?width=650&token=rk2Cgd27pP&height=150&src=pr)](https://codecov.io/gh/apache/qpid-dispatch/pull/636?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #636 +/- ## ========================================== + Coverage 86.48% 86.52% +0.03% ========================================== Files 91 91 Lines 20628 20629 +1 ========================================== + Hits 17841 17850 +9 + Misses 2787 2779 -8 ``` | [Impacted Files](https://codecov.io/gh/apache/qpid-dispatch/pull/636?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [src/container.c](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree#diff-c3JjL2NvbnRhaW5lci5j) | `82.35% <ø> (+0.97%)` | :arrow_up: | | [src/router\_core/transfer.c](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9jb3JlL3RyYW5zZmVyLmM=) | `93.43% <100%> (-0.43%)` | :arrow_down: | | [src/router\_node.c](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9ub2RlLmM=) | `93.11% <100%> (+0.01%)` | :arrow_up: | | [src/router\_core/connections.c](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9jb3JlL2Nvbm5lY3Rpb25zLmM=) | `93.87% <0%> (-0.23%)` | :arrow_down: | | [src/policy.c](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree#diff-c3JjL3BvbGljeS5j) | `87.07% <0%> (+0.01%)` | :arrow_up: | | [src/python\_embedded.c](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree#diff-c3JjL3B5dGhvbl9lbWJlZGRlZC5j) | `78.45% <0%> (+0.05%)` | :arrow_up: | | [src/parse.c](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree#diff-c3JjL3BhcnNlLmM=) | `87.97% <0%> (+0.1%)` | :arrow_up: | | [src/iterator.c](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree#diff-c3JjL2l0ZXJhdG9yLmM=) | `89.51% <0%> (+0.16%)` | :arrow_up: | | ... and [1 more](https://codecov.io/gh/apache/qpid-dispatch/pull/636/diff?src=pr&el=tree-more) | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/636?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/636?src=pr&el=footer). Last update [9f7bb19...e1659f8](https://codecov.io/gh/apache/qpid-dispatch/pull/636?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > router can grant extra credit during drain of a link-routed receiver > -------------------------------------------------------------------- > > Key: DISPATCH-1496 > URL: https://issues.apache.org/jira/browse/DISPATCH-1496 > Project: Qpid Dispatch > Issue Type: Bug > Affects Versions: 1.10.0 > Reporter: Robbie Gemmell > Assignee: Ganesh Murthy > Priority: Major > Attachments: qdrouterd.conf, simple_recv_drain.py > > > The router can grant extra credit during drain of a link-routed receiver, > leading to the router having more outstanding credit to the peer than the > receiver has actually granted. > The following shows a link-routed receiver draining credit from the link, > after a single message having been received from the broker it was > link-routed to. The router relays the flow from client to broker as expected, > with "delivery-count=1, link-credit=999, drain=true", and relays the brokers > response with "delivery-count=1000, link-credit=0, drain=true": > {noformat} > [0x27bb800]:1 <- @flow(19) [next-incoming-id=1, incoming-window=2047, > next-outgoing-id=5, outgoing-window=2147483647, handle=2, delivery-count=1, > link-credit=999, drain=true] > [0x2763c90]:0 -> @flow(19) [next-incoming-id=2, incoming-window=2147483647, > next-outgoing-id=4, outgoing-window=2147483647, handle=2, delivery-count=1, > link-credit=999, drain=true] > [0x2763c90]:0 <- @flow(19) [next-incoming-id=4, incoming-window=2147483647, > next-outgoing-id=2, outgoing-window=2147483647, handle=2, > delivery-count=1000, link-credit=0, drain=true] > [0x27bb800]:1 -> @flow(19) [next-incoming-id=5, incoming-window=2147483647, > next-outgoing-id=1, outgoing-window=2147483647, handle=2, > delivery-count=1000, link-credit=0, drain=true] > {noformat} > The receiver then supplies more credit, which the router again relays as > expected: > {noformat} > [0x27bb800]:1 <- @flow(19) [next-incoming-id=1, incoming-window=2047, > next-outgoing-id=5, outgoing-window=2147483647, handle=2, > delivery-count=1000, link-credit=1000] > [0x2763c90]:0 -> @flow(19) [next-incoming-id=2, incoming-window=2147483647, > next-outgoing-id=4, outgoing-window=2147483647, handle=2, > delivery-count=1000, link-credit=1000, drain=false] > {noformat} > The receiver then drained this credit without having received any messages. > The router relays the drain, but _incorrectly grants additional credit to the > broker at the same time_, despite the receiver not having done so itself. The > credit is drained, and the router updates the receiver to note it is also > drained. Note however that the delivery counts have now diverged between > client->router and router->broker, which seems unexpected for a link route. > {noformat} > [0x27bb800]:1 <- @flow(19) [next-incoming-id=1, incoming-window=2047, > next-outgoing-id=7, outgoing-window=2147483647, handle=2, > delivery-count=1000, link-credit=1000, drain=true] > [0x2763c90]:0 -> @flow(19) [next-incoming-id=2, incoming-window=2147483647, > next-outgoing-id=6, outgoing-window=2147483647, handle=2, > delivery-count=1000, link-credit=2000, drain=true] > [0x2763c90]:0 <- @flow(19) [next-incoming-id=6, incoming-window=2147483647, > next-outgoing-id=2, outgoing-window=2147483647, handle=2, > delivery-count=3000, link-credit=0, drain=true] > [0x27bb800]:1 -> @flow(19) [next-incoming-id=7, incoming-window=2147483647, > next-outgoing-id=1, outgoing-window=2147483647, handle=2, > delivery-count=2000, link-credit=0, drain=true] > {noformat} > Had the broker been able to send messages using the mistakenly granted extra > credit, the router would not be able to pass these all on to the client until > it granted more credit. It isnt clear what would happen to them, but it seems > like they could get stuck in the router until more credit is granted by the > receiver, or the receiver detaches, etc. Again, unexpected for a link-route. > The system continued on in this case since since this receiver grants (and > drains) new credit: > {noformat} > [0x27bb800]:1 <- @flow(19) [next-incoming-id=1, incoming-window=2047, > next-outgoing-id=7, outgoing-window=2147483647, handle=2, > delivery-count=2000, link-credit=1000] > [0x2763c90]:0 -> @flow(19) [next-incoming-id=2, incoming-window=2147483647, > next-outgoing-id=6, outgoing-window=2147483647, handle=2, > delivery-count=3000, link-credit=1000, drain=false] > etc etc > {noformat} > however the delivery-count divergence grows over time as the situation > repeats. > > Noticed while trying out changes for DISPATCH-1488. -- 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