curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adarsh Bhat <adarshb...@gmail.com>
Subject Re: Possible bug in DistributedIdQueue recipe
Date Fri, 20 Sep 2013 00:55:28 GMT
DistributedQueue znode name grows on re-queue
https://issues.apache.org/jira/browse/CURATOR-56

I have created a jira entry and attached a patch that includes a
failing test case.  Please note that the bug is really in the
DistributedQueue recipe. I just happened to be using a
DistributedIdQueue.

Thanks!

Adarsh Bhat
HP Software

On Tue, Sep 17, 2013 at 12:13 PM, Jordan Zimmerman
<jordan@jordanzimmerman.com> wrote:
> That can't be correct behavior. Please open a Jira with a test case.
>
> ====================
> Jordan Zimmerman
>
> On Sep 17, 2013, at 2:09 PM, Adarsh Bhat <adarshbhat@gmail.com> wrote:
>
>> Hi curator users!
>>
>> I'm using the DistributedIdQueue recipe in my system. Although I'm
>> aware of the tech note that this is not suitable for production use,
>> this is a pretty lightweight use case with very few items in the queue
>> at any time. It has actually been working rather well.
>>
>> I encountered a situation recently that was uncovered because of a bug
>> in my code. I neglected to catch an exception in my QueueConsumer,
>> leading to an endless re-queueing of the item. While this is perhaps
>> expected behavior, I also noticed that the name of the znode (and the
>> corresponding lock znode)  grew with each requeue. After many hours,
>> this name grew so long that it brought the entire zookeeper ensemble
>> to its knees. It refused to accept any client connections.
>>
>> Starting with this:
>> Exception processing queue item: queue-|616682fa-15b6-48e0-b7cc-ea6e3023248f
>>
>> And this is how the node name grew:
>> queue-|616682fa-15b6-48e0-b7cc-ea6e3023248f|00000010940000001095
>> queue-|616682fa-15b6-48e0-b7cc-ea6e3023248f|0000001094000000109500000010960000001097
>> queue-|616682fa-15b6-48e0-b7cc-ea6e3023248f|000000109400000010950000001096000000109700000010980000001099
>> ...and so on
>>
>> Before I knew it the node name was many pages long.
>>
>> Is this a defect in the recipe? Or have I done anything wrong myself?
>>
>> Regards
>> Adarsh Bhat

Mime
View raw message