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 E7A50118D9 for ; Wed, 18 Jun 2014 08:14:03 +0000 (UTC) Received: (qmail 50810 invoked by uid 500); 18 Jun 2014 08:14:03 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 50780 invoked by uid 500); 18 Jun 2014 08:14:03 -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 50769 invoked by uid 99); 18 Jun 2014 08:14:03 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2014 08:14:03 +0000 Date: Wed, 18 Jun 2014 08:14:03 +0000 (UTC) From: "Christian Spriegel (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-7401) Memtable.maybeUpdateLiveRatio goes into an endless loop when currentOperations is zero 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-7401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14035104#comment-14035104 ] Christian Spriegel commented on CASSANDRA-7401: ----------------------------------------------- [~iamaleksey]: Thanks! {quote} Apparently yes, it is - when the CF has no cells in it, no range tombstones, and isn't top-level marked for deletion. {quote} That is what I got from the code too :-) {quote} I have NO idea where that CF originated from, and don't even know where to start looking. If you find out - let us know. {quote} I also was not able to figure this out. If I do, I will let you know. > Memtable.maybeUpdateLiveRatio goes into an endless loop when currentOperations is zero > -------------------------------------------------------------------------------------- > > Key: CASSANDRA-7401 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7401 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Christian Spriegel > Assignee: Christian Spriegel > Fix For: 2.0.9 > > Attachments: MemtableFixV1.patch > > > Hi, > I was describing an error the other day on the mailing list, where the MemoryMeter would go into an endless loop. This happened multiple times last week, unfortunetaly I cannot reproduce it at the moment. > The whole cassandra server got unresponsive and logged about 7000k messages per second into the log: > {quote} > ... > INFO [MemoryMeter:1] 2014-06-14 19:24:09,488 Memtable.java (line 481) CFS(Keyspace='MDS', ColumnFamily='ResponsePortal') liveRatio is 64.0 (just-counted was 64.0). calculation took 0ms for 0 cells > ... > {quote} > The cause for this seems to be Memtable.maybeUpdateLiveRatio(), which cannot handle currentOperations (and liveRatioComputedAt) to be zero. The loop will iterate endlessly: > {code} > ... > if (operations < 2 * last) // does never break when zero: 0 < 0 is not true > break; > ... > {code} > One thing I cannot explain: How can the operationcount be zero when maybeUpdateLiveRatio() gets called? > is it possible that addAndGet in resolve() increases by 0 in some cases? > {code} > currentOperations.addAndGet(cf.getColumnCount() + (cf.isMarkedForDelete() ? 1 : 0) + cf.deletionInfo().rangeCount()); // can this be zero? > {code} > Nevertheless, the attached patch fixes the endless loop. Feel free to reassign this ticket or create a followup ticket if currentOperations should not be zero. > kind regards, > Christian -- This message was sent by Atlassian JIRA (v6.2#6252)