[ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421818#comment-13421818 ]
Jonathan Ellis commented on CASSANDRA-3564: ------------------------------------------- bq. this will work only on debian flavored deployments That's a good point... rpm is close enough, but Windows is not. I don't want to make the shutdown hook flush everything by default, because it's harder to undo than the other way around. That is to say, with the status quo, if you want to flush before shutdown, you call {{nodetool flush}}. Not a big deal. But if we made it flush-everything-by-default then to make it NOT flush our options include - a yaml option as discussed above. this sucks because if you start it up with the flag set to flush-first, then you discover you want no-flush-first, it's too late. you're stuck waiting (or with kill -9, which can cause data loss in the durable_writes=false case). - a new JMX method so we can call {{nodetool shutdown-without-flush}}. Ugh. - non-portable options by platform (e.g. explicit signal handling for Linux) Maybe the best thing to do is to leave the status quo and close this as wontfix. > 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, 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