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

Jonathan Ellis commented on CASSANDRA-9200:
-------------------------------------------

bq. oracle and postgresql have the concept of a sequence "cache size" where 
sequence ids are reserved per session as I am proposing here per coordinator

Oracle blog "Ask Tom" explains further:

bq. A sequence has one purpose: assign unique numbers to stuff.  Nothing else.  
There will be gaps, gaps are normal, expected, good, ok, fine.  They will be 
there, there is no avoiding them [even with cache size of 1].  This is not a 
problem, it is expected, it is not "fixable" - a "rollback" for example will 
generate a gap if some session selected a sequence.  Do not assume they are gap 
free and all is well in the world. 

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:369390500346406705

> 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)

Reply via email to