incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Gallamore <>
Subject Re: writes to Cassandra failing occasionally
Date Thu, 08 Apr 2010 19:16:34 GMT
On 04/08/2010 11:46 AM, Jeremy Dunck wrote:
> On Thu, Apr 8, 2010 at 12:41 PM, Mike Gallamore
> <>  wrote:
>> Hello. If you are doing exactly the same thing as N::C::Easy (ie a join on
>> the gettimeofday). Then you should have the same problem I found a fix for.
>> The problem is that the microseconds value isn't zero padded. So if you are
>> at say 23s 25 micro seconds you get a date: 2325. not 23000025 which of
>> course means that sometimes your next timestamp will be "older" than your
>> previous one. Here is a patch to N::C::Easy that fixes this and hopefully a
>> similar thing will fix your code.
> All maintainers of competing libraries should be so helpful.  :-)
Thanks for the compliment but I'm not a maintainer of N::C::Easy just a 
user. Ted Zlatanov is the maintainer of the package and is quite active 
on the forums. I'd already started looking at the area of the code 
before he mentioned it, but if I hadn't thought of it his suggestions 
definitely would have pointed me in the right direction. Also, I've 
literally seen updates to the package the same day that a new version of 
Cassandra comes out. Good job Ted.

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


View raw message