Skip Menu |

This queue is for tickets about the Hash-ConsistentHash CPAN distribution.

Report information
The Basics
Id: 96156
Status: patched
Priority: 0/
Queue: Hash-ConsistentHash

People
Owner: Nobody in particular
Requestors: jfesler [...] gigo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.05
Fixed in: (no value)



Subject: Infinite loop in new()
while( $buckets_per_waight < 5 ){ $self->{mask} = (($self->{mask} << 2) | 3); } If buckets_per_waight < 5 before this code block, it will remain < 5 . This is demonstrable with: my(@targets) = (1..100); my $chash = Hash::ConsistentHash->new( buckets => \@targets, hash_func => \&crc32 );
On Mon Jun 02 16:41:01 2014, jfesler wrote: Show quoted text
> while( $buckets_per_waight < 5 ){ > $self->{mask} = (($self->{mask} << 2) | 3); > } > > > > > If buckets_per_waight < 5 before this code block, it will remain < 5 . > > This is demonstrable with: > > > my(@targets) = (1..100); > > my $chash = Hash::ConsistentHash->new( > buckets => \@targets, > hash_func => \&crc32 > ); >
Confirmed. Fixed version is coming in a munite
On Mon Jun 02 19:59:58 2014, KARAVELOV wrote: Show quoted text
> On Mon Jun 02 16:41:01 2014, jfesler wrote:
> > while( $buckets_per_waight < 5 ){ > > $self->{mask} = (($self->{mask} << 2) | 3); > > } > > > > > > > > > > If buckets_per_waight < 5 before this code block, it will remain < 5 . > > > > This is demonstrable with: > > > > > > my(@targets) = (1..100); > > > > my $chash = Hash::ConsistentHash->new( > > buckets => \@targets, > > hash_func => \&crc32 > > ); > >
> > Confirmed. Fixed version is coming in a munite >
Fixed in version 0.07 that is uploaded on CPAN.