[ 
https://issues.apache.org/jira/browse/CASSANDRA-1070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-1070:
----------------------------------------

    Attachment: 
0001-v2-Introduces-wrapper-for-clock-types-generalizing-time.patch

{quote}
cassandra.thrift still has a few references to timestamp instead of clock. 
Would also be good to add some more user friendly documentation to the Clock 
struct.

A class level javadoc would be good for the ClockType and TimestampClock 
classes, explaining what they are for. Esp in the timestamp one it might help 
users when trying to pick the correct type of clock to use.

In FBUtilities it would be good to have some javadoc for atomicSetMax. I'm not 
a big fan of the "goto" in there either, but perhaps that's just me.
{quote}

Attached v2 patch try to improve on those a bit. But as of this ticket, the 
clock generalization is more boilerplate 
than anything else, and I think we will have a better story to tell in the 
comments when we have more than one type 
of clock. 
As for where the user is concerned, I think we will need a wiki page that 
explains the clock choice in details, but again, it feels 
like it will make more sense with the actual patch for version (and/or 
counters) clocks.

{quote}
Only the cassandra.avpr file is changed, the genavro is not. I don't if we use 
the genavro file though, can Eric Evans enlighten us?
{quote}

I bet I don't know much more than you do. But everything seems to work fine 
without the genavro file (the avro system test (as small as
they are) pass). Feels like it's not necessary to me but I may be wrong.

{quote}
The TimestampClock compareTo unnecessarily creates two Long objects.
{quote}

Yes, that was stupid of me. In it's patch, Kelvin was doing the conversation by 
converting to double. I'm unsure this was
necessary (but maybe Kelvin has a good reason). Anyway, I don't know what I was 
smoking when I wrote that but the
attached patch correct that as well.

Thanks for the comments

> Update interface to use a wrapper for various clock types
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-1070
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1070
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>            Assignee: Sylvain Lebresne
>             Fix For: 0.7
>
>         Attachments: 
> 0001-Introduces-wrapper-for-clock-types-generalizing-time.patch, 
> 0001-v2-Introduces-wrapper-for-clock-types-generalizing-time.patch, 
> 0002-Update-unit-tests.patch, 0003-Update-System-tests.patch
>
>
> In the latest CASSANDRA-580 patch the timestamp used for conflict resolution 
> has been replaced by a Clock object that can contain either timestamp or a 
> context byte array. That change allows for other conflict resolution 
> techniques to be used. 
> The change can be broken out and submitted here in order to make 
> CASSANDRA-580 more manageable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to