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 5C89A17D50 for ; Wed, 1 Apr 2015 18:24:53 +0000 (UTC) Received: (qmail 85256 invoked by uid 500); 1 Apr 2015 18:24:53 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 85211 invoked by uid 500); 1 Apr 2015 18:24:53 -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 85197 invoked by uid 99); 1 Apr 2015 18:24:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2015 18:24:53 +0000 Date: Wed, 1 Apr 2015 18:24:53 +0000 (UTC) From: "Stefan Podkowinski (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-8672) Ambiguous WriteTimeoutException while completing pending CAS commits 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-8672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Podkowinski updated CASSANDRA-8672: ------------------------------------------ Attachment: storyproxybean-2.0-8672.txt storyproxybean-2.1-8672.txt > Ambiguous WriteTimeoutException while completing pending CAS commits > -------------------------------------------------------------------- > > Key: CASSANDRA-8672 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8672 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Stefan Podkowinski > Assignee: Tyler Hobbs > Priority: Minor > Labels: CAS > Fix For: 3.0 > > Attachments: storyproxybean-2.0-8672.txt, storyproxybean-2.1-8672.txt > > > Any CAS update has a chance to trigger a pending/stalled commit of any previously agreed on CAS update. After completing the pending commit, the CAS operation will resume to execute the actual update and also possibly create a new commit. See StorageProxy.cas() > Theres two possbile execution paths that might end up throwing a WriteTimeoutException: > cas() -> beginAndRepairPaxos() -> commitPaxos() > cas() -> commitPaxos() > Unfortunatelly clients catching a WriteTimeoutException won't be able to tell at which stage the commit failed. My guess would be that most developers are not aware that the beginAndRepairPaxos() could also trigger a write and assume that write timeouts would refer to a timeout while writting the actual CAS update. Its therefor not safe to assume that successive CAS or SERIAL read operations will cause a (write-)timeouted CAS operation to get eventually applied. Although some [best-practices advise|http://www.datastax.com/dev/blog/cassandra-error-handling-done-right] claims otherwise. > At this point the safest bet is possibly to retry the complete business transaction in case of an WriteTimeoutException. However, as theres a chance that the timeout occurred while writing the actual CAS operation, another write could potentially complete it and our CAS condition will get a different result upon retry. -- This message was sent by Atlassian JIRA (v6.3.4#6332)