Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 73707 invoked from network); 12 Aug 2009 01:12:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Aug 2009 01:12:32 -0000 Received: (qmail 89914 invoked by uid 500); 12 Aug 2009 01:12:39 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 89878 invoked by uid 500); 12 Aug 2009 01:12:39 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 89824 invoked by uid 99); 12 Aug 2009 01:12:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 01:12:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 01:12:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7DE9229A001F for ; Tue, 11 Aug 2009 18:12:15 -0700 (PDT) Message-ID: <687421962.1250039535514.JavaMail.jira@brutus> Date: Tue, 11 Aug 2009 18:12:15 -0700 (PDT) From: "Michael Greene (JIRA)" To: cassandra-commits@incubator.apache.org Subject: [jira] Updated: (CASSANDRA-220) TCP writes get stuck In-Reply-To: <701619954.1244434687357.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Greene updated CASSANDRA-220: ------------------------------------- Component/s: Core > TCP writes get stuck > -------------------- > > Key: CASSANDRA-220 > URL: https://issues.apache.org/jira/browse/CASSANDRA-220 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Jun Rao > Assignee: Jun Rao > Fix For: 0.4 > > Attachments: 220-2.patch, 220-3.patch, 220-4.patch, 220-5.patch, issue220.patchv1 > > > In our test cluster, I observed that on some nodes, TCP writes get accumulated in TcpConnection.pendingWrites. However, the selector never gets a ready to write event. As a result, all writes get stuck. This is because write(message) and doPendingWrites() are not fully synchronized. This following situation can happen: > 1. write(message) adds stuff to pendingWrites. > 2. a ready to write event happens; in doPendingWrites() buffered requests are written to socket > 3. another write request happens, in write(message), the test for pendingWrites.isEmpty() is false > 4. doPendingWrites() finishes writing all buffered request to socket > 5. in write(message), the new request is added to pendingWrites > Now, ready to write events will never happen again and all write requests get stuck in pendingWrites. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.