You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (Created) (JIRA)" <ji...@apache.org> on 2011/12/02 23:19:39 UTC

[jira] [Created] (CASSANDRA-3564) flush before shutdown so restart is faster

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: paul cannon
            Priority: Minor
             Fix For: 1.1


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
kill -INT = shutdown faster but don't lose any updates
kill -KILL = lose most recent writes unless durable_writes=true and batch commits are on

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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421778#comment-13421778 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

bq. makes sense, will add a 10 min wait period, still what should be the default setting? flush everything or just the non durable tables?

Let's go ahead and flush everything, since startup time is an existing complaint, and maybe I'm in the minority with preferring quick shutdown :)  As long as there's a way to change it, that's fine.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398553#comment-13398553 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

bq. But even that wouldn't provide any meaningful feedback since the user would still have no idea whether things flushed ok so I left it as is.

Right, there's no perfect solution here that I can see.

bq. If its alright, I'll finish up by adding the cassandra stop command to the shell script and handle the broken rpc call.

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.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422522#comment-13422522 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

bq. it should default to off IMO

+1
                
> 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

        

[jira] [Comment Edited] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421770#comment-13421770 ] 

David Alves edited comment on CASSANDRA-3564 at 7/24/12 9:26 PM:
-----------------------------------------------------------------

makes sense, will add a 10 min wait period, still what should be the default setting? flush everything or just the non durable tables?
                
      was (Author: dr-alves):
    makes sense, will add a 10 min wiat period, still what should be the default setting? flush everything or just the non durable tables?
                  
> 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

        

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3564:
--------------------------------------

         Reviewer: thepaul
    Fix Version/s:     (was: 1.1.2)
                   1.2
         Assignee: David Alves  (was: paul cannon)
    
> 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
>
>
> 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

        

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3564:
--------------------------------------

    Description: 
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.

  was:
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
kill -INT = shutdown faster but don't lose any updates
kill -KILL = lose most recent writes unless durable_writes=true and batch commits are on

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.

    
> 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: paul cannon
>            Priority: Minor
>             Fix For: 1.2
>
>
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396410#comment-13396410 ] 

David Alves commented on CASSANDRA-3564:
----------------------------------------

the patch does pretty much what is suggested, SIGINT and SIGKILL behave the same and in addition there is a way to flush everything and exit (by calling System.exit()).

Any suggestion on the best approach to test?

Also patch is still missing changes to scripts.
                
> 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

        

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Alves updated CASSANDRA-3564:
-----------------------------------

    Attachment: 3564.patch

Patch that includes killing/waiting in the do_stop function of the init debian script. 

Script does not actually call the flushTablesAndExit() instead jsvc's stop() hook does, after killing the RPC and native servers.

Node is given 100 secs to finish flush, I'm not sure this is a good default setting.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406093#comment-13406093 ] 

David Alves commented on CASSANDRA-3564:
----------------------------------------

I'm trying to wrap this up...

I changed nodecmd to handle the expected exception nicely (the EOF one because thrift was closed on the other side). the "cassandra" shell script does not deal with PID reading/killing. So I was wondering should we include this call nodetool, read/check pid and kill funcionality in  "cassandra" or should we deal with it within nodetool (maybe make the flushAndExit function return the PID to nodetool and have that kill the process if required).


                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398571#comment-13398571 ] 

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.

hum... handn't thought about that. you're right. any script/code comes to mind that has similar functionality? (for inspiration :)) 
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421826#comment-13421826 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

bq. Maybe the best thing to do is to leave the status quo and close this as wontfix.

I'm kind of leaning toward that, but we could still improve the (debian) packaging to have a 'call flush for me before shutdown' flag at least, giving you most of the spirit of the ticket if you'd like it.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422517#comment-13422517 ] 

Jonathan Ellis commented on CASSANDRA-3564:
-------------------------------------------

bq. we could still improve the (debian) packaging to have a 'call flush for me before shutdown' 

WFM, but it should default to off IMO.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421757#comment-13421757 ] 

David Alves commented on CASSANDRA-3564:
----------------------------------------

I suggest that we add flag that when enabled waits for the full flush for all tables and maybe we don't even need the wait period since the user explicitely told that he wanted a full flush and should be willing to wait. When the flag disabled reverts to the current setting (flush only non-durable tables).

Even in the default setting (say the admin remembered he wanted to flush everything *after* the daemon started) he can always use nodetool to do so.

                
> 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

        

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3564:
--------------------------------------

    Fix Version/s:     (was: 1.2.0)
                   1.3
    
> 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: Brandon Williams
>            Priority: Minor
>             Fix For: 1.3
>
>         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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398210#comment-13398210 ] 

Jonathan Ellis commented on CASSANDRA-3564:
-------------------------------------------

I'm happy to leave this one to manual review/testing.  The beta testers will not be able to avoid testing it. :)
                
> 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

        

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3564:
--------------------------------------

    Reviewer: thepaul  (was: brandon.williams)
    Assignee: Brandon Williams  (was: David Alves)
    
> 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: Brandon Williams
>            Priority: Minor
>             Fix For: 1.2.0
>
>         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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-3564:
----------------------------------------

    Comment: was deleted

(was: I'd prefer to do it in packaging, *but* reinventing all that logic on windows is painful, so I guess we'll go with yaml.)
    
> 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

        

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3564:
--------------------------------------

    Reviewer: brandon.williams  (was: thepaul)
    Assignee: David Alves  (was: Brandon Williams)
    
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421713#comment-13421713 ] 

David Alves commented on CASSANDRA-3564:
----------------------------------------

You mean send SIGINT/SIGTERM before waiting and SIGKILL after right?

SIGINT/SIGTERM don't do a global flush because the shutdown hooks still only flush tables that have durable_writes to false, so either we used nodetool to explicitly call flushAllTables of do in cassandra daemon which is being called from jsvc anyway.




                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406098#comment-13406098 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

The debian/init script should handle it (and has an is_running function that you can use and get the pid from)
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399091#comment-13399091 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

bq. 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".

Nodetool is going to block until it's finished, at which point if the pid still exists (I guess if jmx timed out or something) we just SIGKILL it.
                
> 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

        

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Alves updated CASSANDRA-3564:
-----------------------------------

    Attachment: 3564.patch

-extracts flushing all tables to a method that takes a boolean flag
- when flag is false only tables that have durable_writes=off are flushed, when true all tables are flushed.
- added the method to the mbean and nodeprobe
- added flushandexit command to nodetool

                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398546#comment-13398546 ] 

David Alves commented on CASSANDRA-3564:
----------------------------------------

thanks for the review

bq. The catch with flushandexit is, you have no way of knowing if it worked or not (from nodetool's perspective) since either way, you're going to get an error (EOF because the jvm shutdown, or EOF because ???)

right, I thought about that (might even deserve some special error handling) but the only alternative that I could think was to make the call async so the RPC method would return fine. But even that wouldn't provide any meaningful feedback since the user would still have no idea whether things flushed ok so I left it as is.

If its alright, I'll finish up by adding the cassandra stop command to the shell script and handle the broken rpc call.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422511#comment-13422511 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

Doesn't {{nodetool flush}} already contain everything we need?  We just need the packaging glue.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421770#comment-13421770 ] 

David Alves commented on CASSANDRA-3564:
----------------------------------------

makes sense, will add a 10 min wiat period, still what should be the default setting? flush everything or just the non durable tables?
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421764#comment-13421764 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

bq. I suggest that we add flag that when enabled waits for the full flush for all tables and maybe we don't even need the wait period since the user explicitely told that he wanted a full flush and should be willing to wait. When the flag disabled reverts to the current setting (flush only non-durable tables).

That sounds reasonable but I think we should have *some* kind of ceiling (10 minutes or something) where we kill -9 it, just in case we ever have a bug that causes us not to exit (we've had them before), so we don't hang the shutdown of the entire machine forever.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398578#comment-13398578 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

I'm pretty sure the init script is already tracking the pid in a file and probably has a function to check if it's alive, so it's just a matter of doing that and issuing an extra kill if needed.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421820#comment-13421820 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

I'd prefer to do it in packaging, *but* reinventing all that logic on windows is painful, so I guess we'll go with yaml.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421737#comment-13421737 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

bq. You mean send SIGINT/SIGTERM before waiting and SIGKILL after right?

Oops, I misread, disregard that.

One thing that occurs to me now though, is that as an admin, I'd probably be annoyed by waiting 100s for something to shutdown (and it's not completely unreasonable for flush to take that long.)  Generally I want things to shutdown asap, and startup time be damned, which I understand is counter to the purpose of this ticket, but still I think we should put the WAIT_FOR_STOP in /etc/default/cassandra as well as a flag to enable/disable this behavior.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421792#comment-13421792 ] 

David Alves commented on CASSANDRA-3564:
----------------------------------------

One last thing... since we're only changing debian/init this will work only on debian flavored deployments

maybe we should go ahead place the flag on the cassandra.yaml and make the shutdown hook follow that option inetead, this would make the option valid for all deployments (I'd still add the automated wait/kill for debian deployments, non debian deployments would have to take care of killing themselves).

wdyt?
                
> 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

        

[jira] [Updated] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3564:
--------------------------------------

    Assignee: Brandon Williams  (was: David Alves)
    
> 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: Brandon Williams
>            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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Robert Coli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448066#comment-13448066 ] 

Robert Coli commented on CASSANDRA-3564:
----------------------------------------

> That sounds reasonable but I think we should have some kind of ceiling (10 minutes or something) where we kill -9 it, just in case we ever have a bug that causes us not to exit (we've had them before), so we don't hang the shutdown of the entire machine forever.
> ...
> Unless I'm missing something, you can't do anything about a kill -9, you're cooked.

The trivial case of this is a node where the data directory has been marked read-only due to errors but the commitlog is on a different device which is still writable.

In the status quo, stopping such a node will not result in the sstable flush blocking forever. The node just stops. On restart it replays and (CASSANDRA-1967) these replayed memtables are then flushed. This results in the same flush blocking forever, but the node otherwise serves reads and can take writes until it OOMs. It also doesn't need to be sent a SIGKILL at any time.

If the node flushes on shutdown in such a way that it is effectively "drain"ing the node, then in order to avoid data loss you merely need to wait for the commitlog sync. The relevant thing seems to be that the *commitlog* is synced before you SIGKILL the node, not whether the *flush* succeeds or not. In practice, this window seems likely to be sized in a small number of seconds even with the most lenient commitlog flushing, and is therefore likely irrelevant.

However, with flush-on-shutdown you *have* to send the process SIGKILL in this case, because the flush can hang indefinitely. I get worried any time I *have* to send SIGKILL to a database, even if I understand logically that is it safe. Adding flush to the shutdown path seems to create a new case in which I *have* to do this uncomfortable thing.
 
> 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.

I don't understand why calling nodetool flush/drain is not a big deal here, but is a big deal enough to special case shutdown when durable_writes is off in CASSANDRA-2958.

In my opinion, the sane default here is the pre-2958 status quo : no flushing on shutdown ever, including when durable_writes is off. Operators who want to drain nodes before stopping them can do so via nodetool.
                
> 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: Brandon Williams
>            Priority: Minor
>             Fix For: 1.2.0
>
>         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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406093#comment-13406093 ] 

David Alves edited comment on CASSANDRA-3564 at 7/3/12 9:58 PM:
----------------------------------------------------------------

I'm trying to wrap this up...

I changed nodecmd to handle the expected exception nicely (the EOF one because thrift was closed on the other side). the "cassandra" shell script does not deal with PID reading/killing. So I was wondering should we include this functionality in "cassandra", i.e., call nodetool, read/check pid wait and kill, or should we deal with it within nodetool (maybe make the flushAndExit function return the PID to nodetool and have that kill the process if required).


                
      was (Author: dr-alves):
    I'm trying to wrap this up...

I changed nodecmd to handle the expected exception nicely (the EOF one because thrift was closed on the other side). the "cassandra" shell script does not deal with PID reading/killing. So I was wondering should we include this call nodetool, read/check pid and kill funcionality in  "cassandra" or should we deal with it within nodetool (maybe make the flushAndExit function return the PID to nodetool and have that kill the process if required).


                  
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398515#comment-13398515 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

The catch with flushandexit is, you have no way of knowing if it worked or not (from nodetool's perspective) since either way, you're going to get an error (EOF because the jvm shutdown, or EOF because ???)

bq. kill -KILL = lose most recent writes unless durable_writes=true and batch commits are on [also current behavior]

Unless I'm missing something, you can't do anything about a kill -9, you're cooked.

Anyway, the code looks good to me.
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421691#comment-13421691 ] 

Brandon Williams commented on CASSANDRA-3564:
---------------------------------------------

Why don't we kill before we sleep on WAIT_FOR_STOP?
                
> 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

        

[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

Posted by "David Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421828#comment-13421828 ] 

David Alves commented on CASSANDRA-3564:
----------------------------------------

the patch includes the nodetool functionality to flush everything, we'd still want that right? I can trim it to just that (and open a different ticket?).
                
> 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