Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 16547180DD for ; Wed, 1 Jul 2015 17:17:05 +0000 (UTC) Received: (qmail 48861 invoked by uid 500); 1 Jul 2015 17:17:05 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 48826 invoked by uid 500); 1 Jul 2015 17:17:05 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 48812 invoked by uid 99); 1 Jul 2015 17:17:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jul 2015 17:17:05 +0000 Date: Wed, 1 Jul 2015 17:17:05 +0000 (UTC) From: "Patrick McFadin (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-9200) Sequences MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-9200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14610660#comment-14610660 ] Patrick McFadin commented on CASSANDRA-9200: -------------------------------------------- Bugs, user error, sun spots, anything that may cause values to become overlapping. You get the safety of unique checks in RDBMS to stop you from overwriting. If I were to advise someone to use a sequence on a partition key, always use IF NOT EXISTS on insert. If it were a 32 bit value, what do you get after inserting 4 billion keys? If these were scoped per partition, the chance of data loss is much less. In addition, I can see the general usefullness of having an increasing number for ordering in partition without the need for something like a timeUUID or timestamp. [~tupshin] not sure if this matches with your IMAP use case. Seems like it would. > 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)