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 8870FD187 for ; Fri, 22 Jun 2012 03:14:47 +0000 (UTC) Received: (qmail 75052 invoked by uid 500); 22 Jun 2012 03:14:46 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 74864 invoked by uid 500); 22 Jun 2012 03:14:46 -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 74814 invoked by uid 99); 22 Jun 2012 03:14:44 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 03:14:44 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id E302B1416E9 for ; Fri, 22 Jun 2012 03:14:43 +0000 (UTC) Date: Fri, 22 Jun 2012 03:14:43 +0000 (UTC) From: "David Alves (JIRA)" To: commits@cassandra.apache.org Message-ID: <1500127592.42652.1340334883931.JavaMail.jiratomcat@issues-vm> In-Reply-To: <86865828.35982.1322864379957.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster 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-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399090#comment-13399090 ] David Alves commented on CASSANDRA-3564: ---------------------------------------- bq. Sure, but this is where is gets a little more complicated, since after receiving the error the init script needs to check that the pid is really gone, and if not get more forceful. was about to implement this when a problem came to mind. There's no time limit on how long a flush will take and shutdown hooks can take as long as needed to finish up so we have no idea when to "get more forceful". There's two ways we could deal with this IMO: - we poll-check on the pid, nodetool side, and give it an umbrella grace period to do everything, after that we SIGKILL it - we simply inform that it might take a while. > flush before shutdown so restart is faster > ------------------------------------------ > > Key: CASSANDRA-3564 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3564 > Project: Cassandra > Issue Type: New Feature > Components: Packaging > Reporter: Jonathan Ellis > Assignee: David Alves > Priority: Minor > Fix For: 1.2 > > Attachments: 3564.patch > > > Cassandra handles flush in its shutdown hook for durable_writes=false CFs (otherwise we're *guaranteed* to lose data) but leaves it up to the operator otherwise. I'd rather leave it that way to offer these semantics: > - cassandra stop = shutdown nicely [explicit flush, then kill -int] > - kill -INT = shutdown faster but don't lose any updates [current behavior] > - kill -KILL = lose most recent writes unless durable_writes=true and batch commits are on [also current behavior] > But if it's not reasonable to use nodetool from the init script then I guess we can just make the shutdown hook flush everything. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira