Ken Giusti created PROTON-1743:
----------------------------------

             Summary: 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
             Fix For: proton-c-0.20.0
         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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to