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 D7F4CC5CE for ; Mon, 5 Aug 2013 21:44:50 +0000 (UTC) Received: (qmail 5794 invoked by uid 500); 5 Aug 2013 21:44:49 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 5770 invoked by uid 500); 5 Aug 2013 21:44:49 -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 5731 invoked by uid 99); 5 Aug 2013 21:44:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Aug 2013 21:44:49 +0000 Date: Mon, 5 Aug 2013 21:44:49 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CASSANDRA-5830) Paxos loops endlessly due to faulty condition check 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-5830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis resolved CASSANDRA-5830. --------------------------------------- Resolution: Fixed Reviewer: jbellis Assignee: Soumava Ghosh Fixed condition check in 4b4ccc3ccfcc7be8fad0b25bde9a180f0016d520, thanks! > Paxos loops endlessly due to faulty condition check > --------------------------------------------------- > > Key: CASSANDRA-5830 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5830 > Project: Cassandra > Issue Type: Bug > Affects Versions: 2.0 beta 2 > Reporter: Soumava Ghosh > Assignee: Soumava Ghosh > Labels: paxos > Fix For: 2.0 > > > Following is the code segment (StorageProxy.java:361) which causes the issue: > Start is the start time of the paxos, is always less than the current system time, and therefore the negative difference is always less than the timeout. > {code:title=StorageProxy.java|borderStyle=solid} > private static UUID beginAndRepairPaxos(long start, ByteBuffer key, CFMetaData metadata, List liveEndpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos) > throws WriteTimeoutException > { > long timeout = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getCasContentionTimeout()); > PrepareCallback summary = null; > while (start - System.nanoTime() < timeout) > { > long ballotMillis = summary == null > ? System.currentTimeMillis() > : Math.max(System.currentTimeMillis(), 1 + UUIDGen.unixTimestamp(summary.inProgressCommit.ballot)); > UUID ballot = UUIDGen.getTimeUUID(ballotMillis); > {code} > Here, the paxos gets stuck when PREPARE returns 'true' but with inProgressCommit. The code in StorageProxy.java:beginAndRepairPaxos() then tries to issue a PROPOSE and COMMIT for the inProgressCommit, and if it repeatedly receives 'false' as a PREPARE_RESPONSE it gets stuck in an endless loop until PREPARE_RESPONSE is true. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira