You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Justin Ross (JIRA)" <ji...@apache.org> on 2018/03/05 23:26:00 UTC
[jira] [Updated] (PROTON-1743) BlockingReceiver raises IndexError
when accepting presettled messages
[ https://issues.apache.org/jira/browse/PROTON-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Ross updated PROTON-1743:
--------------------------------
Labels: reproducer (was: )
> BlockingReceiver raises IndexError when accepting presettled messages
> ---------------------------------------------------------------------
>
> Key: PROTON-1743
> URL: https://issues.apache.org/jira/browse/PROTON-1743
> Project: Qpid Proton
> Issue Type: Bug
> Components: python-binding
> Affects Versions: proton-c-0.19.0
> Reporter: Ken Giusti
> Assignee: Justin Ross
> Priority: Major
> Labels: reproducer
> Attachments: testy.py
>
>
> The following exception is raised by the attached reproducer when the receiver attempts to accept a message:
>
> python ~/work/dispatch/qpid-dispatch/BUILD/testy.py
> Hello World!
> Traceback (most recent call last):
> File "/home/kgiusti/work/dispatch/qpid-dispatch/BUILD/testy.py", line 34, in <module>
> receiver.accept()
> File "/home/kgiusti/PY27/lib/python2.7/site-packages/proton/utils.py", line 158, in accept
> self.settle(Delivery.ACCEPTED)
> File "/home/kgiusti/PY27/lib/python2.7/site-packages/proton/utils.py", line 172, in settle
> self.fetcher.settle(state)
> File "/home/kgiusti/PY27/lib/python2.7/site-packages/proton/utils.py", line 122, in settle
> delivery = self.unsettled.popleft()
> IndexError: pop from an empty deque
>
> The issue is caused by having the receiver accept() a pre-settled message.
> The real issue is that there is no way for the BlockingReceiver to know if the message is pre-settled since the delivery corresponding to the received message is not available to the receiver. Therefore it must call accept (or reject, modify, etc) on each message.
> Expected behavior - attempting to settle a pre-settled message should be treated as a no-op.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org