> On Aug. 19, 2013, 5:56 p.m., Chug Rolke wrote:
> > /trunk/qpid/cpp/src/qpid/broker/Queue.cpp, line 1216
> > <https://reviews.apache.org/r/13650/diff/1/?file=342214#file342214line1216>
> >
> >     Does this need to be bracketed by if (buffer.available()) like line 
> > 1011 above? Just move the closing brace line 1215 to after this code.

Can't move the closing brace from the previous block. The buffer.available() 
call checks if there is more data available in the buffer (not that the buffer 
itself is available). Since buffer.getShortString(name) is called in the above 
block, the buffer's internal pointer may indeed be at the end. We need to call 
buffer.available() again to ensure that the _userId string is available. I 
surrounded the new code with it's own if (buffer.available()) block.


- Ernie


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


On Aug. 29, 2013, 2:50 p.m., Ernie Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13650/
> -----------------------------------------------------------
> 
> (Updated Aug. 29, 2013, 2:50 p.m.)
> 
> 
> Review request for qpid and Chug Rolke.
> 
> 
> Bugs: https://bugzilla.redhat.com/show_bug.cgi?id=955688
>     
> https://issues.apache.org/jira/browse/https://bugzilla.redhat.com/show_bug.cgi?id=955688
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> When creating/deleting durable queues, their "owner" isn't tracked after 
> restart. Therefore it is possible to exceed queue quotas after a restart.
> 
> Problem scenario 1: 
> -Set ACL limit on a user to 10 queues
> -Create 10 durable queues for that user
> -Restart the broker
> -The 10 durable queues are automatically recovered
> -The user can now create an additional 10 queues
> 
> Problem scenario 2:
> - Set ACL limit on a user to 10 queues
> - Create 10 durable queues for that user
> - Decrease ACL limit on that user to 5 queues
> - Restart the broker
> - All 10 queues should be recovered, but no new ones should be allow until 
> user drops below 5 queues
>  
> This is a patch supplied by Pavel Moravec.
> It allows all existing durable queues to be recovered during broker restart, 
> but prevents any new queues from being created until the user is below the 
> ACL limit.
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1515496 
>   /trunk/qpid/cpp/src/qpid/broker/Queue.h 1515496 
>   /trunk/qpid/cpp/src/qpid/broker/Queue.cpp 1515496 
>   /trunk/qpid/cpp/src/qpid/broker/QueueRegistry.cpp 1515496 
> 
> Diff: https://reviews.apache.org/r/13650/diff/
> 
> 
> Testing
> -------
> 
> Tried patch with both scenarios from description.
> 
> 
> Thanks,
> 
> Ernie Allen
> 
>

Reply via email to