cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9200) Sequences
Date Wed, 01 Jul 2015 16:31:05 GMT


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.

> Sequences
> ---------
>                 Key: CASSANDRA-9200
>                 URL:
>             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:

This message was sent by Atlassian JIRA

View raw message