[ https://issues.apache.org/jira/browse/CASSANDRA-9200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14610595#comment-14610595 ]
Jonathan Ellis commented on CASSANDRA-9200: ------------------------------------------- bq. Really not a fan of using LWT to pre-allocate blocks. 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.) bq. When you say 'sequence', most RDBMS-expatriates will think it will behave like Oracle/MySQL/SQLServer sequences, which it won't. In this case, a "mostly increasing" sequence is what I am (implicitly) proposing, and in fact 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. I think this is a reasonable compromise, and while it may be surprising to RDBMS users at first it is a surprise they will discover quickly. (Surprises that you don't see in test but do see in production are worse.) bq. Further, those users will also expect to be able to list the rows in order by that seqeunce value I reject this slippery slope argument. We don't support ORDER BY in the general case already; it's not reasonable to say this will suddenly make people expect it. bq. Building this kind of system on top of C* today requires an external CP system (ick operational complexity) This is the key, if we don't deliver something good enough users will be forced to roll something worse themselves. > 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)