cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Zlatanov <...@lifelogs.com>
Subject Re: writes to Cassandra failing occasionally
Date Fri, 09 Apr 2010 14:09:27 GMT
On Thu, 08 Apr 2010 12:16:34 -0700 Mike Gallamore <mike.e.gallamore@googlemail.com> wrote:


MG> Hopefully my fix helps others. I imagine it is something you'll run
MG> into regardless of the language/interface you use, for example I'm
MG> pretty sure that the C/C++ time function truncates values too. I'd
MG> recommend anyone using time to generate your timestamp: be careful
MG> that your timestamp is always the same length (or at least that the
MG> sub components that you are concatenating are the length you expect
MG> them to be).

This was a Perl-related bug so I doubt other will see it.  It's really
caused by the fact that 32-bit Perl doesn't have a native 64-bit
pack/unpack function so I'm using the Bit::Vector wrappers and
consequently passing around Longs as strings.

MG> I've written a patch that zero pads the numbers. I've attached it to
MG> this post but encase attachments don't come through on this
MG> mailinglist here is the body:

Thanks so much for catching this.  I didn't notice it at all (it works
90% of the time!).  I uploaded N::C::Easy 0.10 to CPAN with the fix you
proposed, so now timestamps are produced correctly.

Ted


Mime
View raw message