-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17587/#review33323
-----------------------------------------------------------


if (isinstance(hdr, jrnl.DeqRec)) and (hdr.deq_rid in self.__map):

I don't think this change is correct, you cannot search for rids in the 
transaction map self.__map like this. Better would be to catch the exception 
and handle it:

1. Attempt to unlock the dequeue rid in the enqueue map (as is currently the 
case)
2. If a NonExistentRecordError is thrown, then:
   a. Check for the dequeue rid in any enqueue records in the current xid being 
aborted. If found, ignore, as the entire xid is being deleted. This should 
happen for the TPL only.
   b. If not part of the current transaction being aborted, rethrow the 
exception.

- Kim van der Riet


On Jan. 31, 2014, 12:14 p.m., Pavel Moravec wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17587/
> -----------------------------------------------------------
> 
> (Updated Jan. 31, 2014, 12:14 p.m.)
> 
> 
> Review request for qpid and Kim van der Riet.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/QPID-5530
>     
> https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/QPID-5530
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> Processing DTX enqueue, dequeue and abort, self.__emap is empty map 
> everytime. Hence executing:
> 
>      def _abort(self, xid):
>          """Perform an abort operation for the given xid record"""
>          for fid, hdr, lock in self.__map[xid]:
>              if isinstance(hdr, jrnl.DeqRec):
>                  self.__emap.unlock(hdr.deq_rid)
>          del self.__map[xid]
> 
> raises error in unmap.
> 
> Though I did not understand full logic of emap / map in janal.py, the extra 
> condition in _abort prevents raising the error and allows proper processing 
> of the abort.
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/tools/src/py/qpidstore/janal.py 1562703 
> 
> Diff: https://reviews.apache.org/r/17587/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Pavel Moravec
> 
>

Reply via email to