Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 84610200B8B for ; Mon, 19 Sep 2016 12:39:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 81CD7160ABC; Mon, 19 Sep 2016 10:39:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CD365160ACC for ; Mon, 19 Sep 2016 12:39:21 +0200 (CEST) Received: (qmail 81148 invoked by uid 500); 19 Sep 2016 10:39:20 -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 81046 invoked by uid 99); 19 Sep 2016 10:39:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2016 10:39:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A0F792C0D59 for ; Mon, 19 Sep 2016 10:39:20 +0000 (UTC) Date: Mon, 19 Sep 2016 10:39:20 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-12625) Distinguish between CAS prepare and propose failures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 19 Sep 2016 10:39:22 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15503055#comment-15503055 ] Sylvain Lebresne commented on CASSANDRA-12625: ---------------------------------------------- bq. the feedback that the hardest part of building applications using LWTs is dealing with WriteTimeouts of type CAS I have no problem believing that, this would have been my pick too if I had been asked. bq. think we should add a separate WriteType for timing out during the prepare phase We can, though my preferred way of adding that information would probably be to add a new boolean to WriteTimeoutException when WriteType is CAS to indicate if we can guarantee it won't be applied or not (could call it {{canSafelyReply}} for instance). This feels cleaner to me. With that said, as said in CASSANDRA-8672, I don't think this will simplify application building. The nasty part of dealing with write timeouts on CAS is when you don't know if the write has/may be applied or not and you will still have to deal with that. Having the distinction of the ticket is more an optimization that allow a faster strategy (just retry) when you timeout during prepare, but you'll still need the more complex code for the other cases. Doesn't mean we can't optimize of course. bq. assuming it will need a native protocol change when can we do it? It will indeed require a protocol change and since CASSANDRA-12142 we can _commit_ changes for v5. But v5 will probably only be finalized for Cassandra 4.0. > Distinguish between CAS prepare and propose failures > ---------------------------------------------------- > > Key: CASSANDRA-12625 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12625 > Project: Cassandra > Issue Type: Improvement > Reporter: Christopher Batey > Assignee: Christopher Batey > Priority: Minor > Labels: cas > Fix For: 3.x > > > I spoke to a lot of users at the summit and had the feedback that the hardest part of building applications using LWTs is dealing with WriteTimeouts of type CAS. > Following up from https://issues.apache.org/jira/browse/CASSANDRA-8672 I think we should add a separate WriteType for timing out during the prepare phase assuming we can advise users to retry the operation or be confident it has failed as it won't be completed by a later SERIAL read or LWT. > We can't remove the ambiguity at the propose phase but this will remove one of the unknown cases. > cc [~slebresne] [~bdeggleston] [~spodxx@gmail.com] > Happy to do a patch for this but assuming it will need a native protocol change when can we do it? -- This message was sent by Atlassian JIRA (v6.3.4#6332)