cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6147) Allow Thrift opt-in to server-side timestamps
Date Sat, 08 Mar 2014 00:04:45 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-6147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13924524#comment-13924524
] 

Tyler Hobbs commented on CASSANDRA-6147:
----------------------------------------

Ah, yes, it looks like Thrift automatically makes all method arguments required.  (It emits
the warning "optional keyword is ignored in argument lists" when you run gen-thrift-*.)  Using
None or an empty string also doesn't work in python.

We can't make the timestamp optional for remove(), but it would still work for Deletion objects.
 I'm not a fan of partial support for features, but I believe almost all Thrift clients use
batch_mutate() + Deletions instead of remove() (which is extremely limited).  So, I suppose
nearly-complete support of optional timestamps is better than only having optional timestamps
for inserts and no support at all for deletes.

> Allow Thrift opt-in to server-side timestamps
> ---------------------------------------------
>
>                 Key: CASSANDRA-6147
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6147
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>            Priority: Minor
>             Fix For: 2.1 beta2
>
>
> Thrift users are still forced to generate timestamps on the client side. Currently the
way the thrift bindings are generated users are forced to supply timestamps. There are two
solutions I see.
> * -1 as timestamp means "generate on the server side"
> This is a breaking change, for those using -1 as a timestamp (which should effectively
be no one.
> * Prepare yourself....
> Our thrift signatures are wrong, you can't overload methods in thrift
> thrift.get(byte [], byte[], ts) 
> should REALLY be changed to 
> GetRequest g =  new GetRequest()
> g.setName()
> g.setValue()
> g.setTs() ///optional 
> thrift. get( g )
> I know no one is going to want to make this change because thrift is quasi/dead but it
would allow us to evolve thrift in a meaningful way. We could simple add these new methods
under different names as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message