You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2015/07/01 19:21:05 UTC

[jira] [Comment Edited] (CASSANDRA-9200) Sequences

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

Aleksey Yeschenko edited comment on CASSANDRA-9200 at 7/1/15 5:20 PM:
----------------------------------------------------------------------

bq. Not sure what your counterproposal is. "Projecting" tokens to longs is going to result in duplicate longs which is not acceptable. (And as tupshin notes, some users need a 32bit solution as well.)

It would work for 64 bits. For 32 bits some math would be required.

After some offline conversations - I'm fine with partition-scoped sequences (assuming someone comes up with a decent plan for them).

bq. This is the key, if we don't deliver something good enough users will be forced to roll something worse themselves. 

This is true for many features <X>. It's expected that Cassandra will not provide you with all the functionality you can possibly need. Having people roll their own is fine sometimes, if the alternative is putting everything in C*. Especially features that are bad architectural fit with Cassandra model.


was (Author: iamaleksey):
bq. Not sure what your counterproposal is. "Projecting" tokens to longs is going to result in duplicate longs which is not acceptable. (And as tupshin notes, some users need a 32bit solution as well.)

It would work for 64 bytes. For 32 bytes some math would be required.

After some offline conversations - I'm fine with partition-scoped sequences (assuming someone comes up with a decent plan for them).

bq. This is the key, if we don't deliver something good enough users will be forced to roll something worse themselves. 

This is true for many features <X>. It's expected that Cassandra will not provide you with all the functionality you can possibly need. Having people roll their own is fine sometimes, if the alternative is putting everything in C*. Especially features that are bad architectural fit with Cassandra model.

> Sequences
> ---------
>
>                 Key: CASSANDRA-9200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9200
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Jonathan Ellis
>            Assignee: Robert Stupp
>             Fix For: 3.x
>
>
> UUIDs are usually the right choice for surrogate keys, but sometimes application constraints dictate an increasing numeric value.
> We could do this by using LWT to reserve "blocks" of the sequence for each member of the cluster, which would eliminate paxos contention at the cost of not being strictly increasing.
> PostgreSQL syntax: http://www.postgresql.org/docs/9.4/static/sql-createsequence.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)