adding 0 to counter column increases value by 1 #9

Closed
neonknight opened this Issue Feb 28, 2012 · 1 comment

Comments

Projects
None yet
2 participants

I expected no change in value. See my example as I tried this in perlconsole:

Perl> $conn->get('mycolfam', 'foobar')->{ccol}->{'count'}
6

Perl> $conn->add('mycolfam', 'foobar', 'count', 0, {'super_column' => 'ccol'});
1

Perl> $conn->get('mycolfam', 'foobar')->{ccol}->{'count'}
7

All other values, including negative values, behave as excpected.

fmgoncalves was assigned Feb 28, 2012

Owner

fmgoncalves commented Feb 28, 2012

First of all thanks for the bug report.

Secondly, despite there being a bug, you might get a performance increase if you filter the 0 additions, those are a useless call to the database since they have no effect on the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment