You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Eric Evans (JIRA)" <ji...@apache.org> on 2009/03/27 21:35:50 UTC
[jira] Created: (CASSANDRA-20) Daemonization of cassandra nodes
Daemonization of cassandra nodes
--------------------------------
Key: CASSANDRA-20
URL: https://issues.apache.org/jira/browse/CASSANDRA-20
Project: Cassandra
Issue Type: New Feature
Reporter: Eric Evans
Priority: Minor
Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CASSANDRA-20) Daemonization of cassandra nodes
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-20?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis reassigned CASSANDRA-20:
---------------------------------------
Assignee: Jonathan Ellis
> Daemonization of cassandra nodes
> --------------------------------
>
> Key: CASSANDRA-20
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Eric Evans
> Assignee: Jonathan Ellis
> Priority: Minor
> Attachments: commons-daemon.patch
>
>
> Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CASSANDRA-20) Daemonization of cassandra nodes
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-20?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-20.
-------------------------------------
Resolution: Fixed
applied with minor changes
> Daemonization of cassandra nodes
> --------------------------------
>
> Key: CASSANDRA-20
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Eric Evans
> Assignee: Jonathan Ellis
> Priority: Minor
> Attachments: cassandra-20-1.patch, commons-daemon.patch
>
>
> Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-20) Daemonization of cassandra nodes
Posted by "Sandeep Tata (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690155#action_12690155 ]
Sandeep Tata commented on CASSANDRA-20:
---------------------------------------
I remember seeing some logic around inserting a "FlushKey". Haven't tested it, but the idea is that any insertion of a "FlushKey" triggers a memtable flush. IMHO getting this working and tested is probably simpler than pushing for a clean shutdown option. I'll take a look and see if this stuff is working.
> Daemonization of cassandra nodes
> --------------------------------
>
> Key: CASSANDRA-20
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Eric Evans
> Priority: Minor
> Attachments: commons-daemon.patch
>
>
> Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-20) Daemonization of cassandra nodes
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-20?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Evans updated CASSANDRA-20:
--------------------------------
Attachment: cassandra-20-1.patch
The attached patch creates a daemon class which still allows one to use
the jsvc wrapper, but creates no dependency on commons-daemon in the process.
It also has a main method and shell script meant to replace
{start,stop}-server.
The script sources an include file which can be used to customize the
environment, the default (bin/cassandra.in.sh) should be sufficient for
anyone wanting to run out of a checkout.
The script also accepts arguments to set a pid file, or to cause the
daemon to run in the foreground (-p and -f respectively).
> Daemonization of cassandra nodes
> --------------------------------
>
> Key: CASSANDRA-20
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Eric Evans
> Assignee: Jonathan Ellis
> Priority: Minor
> Attachments: cassandra-20-1.patch, commons-daemon.patch
>
>
> Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-20) Daemonization of cassandra nodes
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690103#action_12690103 ]
Todd Lipcon commented on CASSANDRA-20:
--------------------------------------
I agree with Jonathan that dependencies on C modules are a pain -- any such dependencies should be strictly optional and only when there are other options, imho.
As for shutdown, I see the point of a "clean shutdown" only in that it can make recovery faster on startup (since the commitlog has been checkpointed more recently). However, if there were a "force memtable flush now" command available separately, that would convince me that "Crash only" is the way to go. "Force flush now" is generally useful, regardless.
> Daemonization of cassandra nodes
> --------------------------------
>
> Key: CASSANDRA-20
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Eric Evans
> Priority: Minor
> Attachments: commons-daemon.patch
>
>
> Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-20) Daemonization of cassandra nodes
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693453#action_12693453 ]
Jonathan Ellis commented on CASSANDRA-20:
-----------------------------------------
Yes, that's in Memtable. It definitely works (there's even a unit test for it now!) But it's kind of a hack. We should refactor the flush code to not intrude on the user-visible namespace like that. Exposing it in thrift is easy. (But what is the atom that is useful to flush from a user level? All memtables dealing with a key? A given columnfamily? Just everything for a specific node so you can restart faster as in Todd's suggestion?) This deserves a separate issue IMO.
> Daemonization of cassandra nodes
> --------------------------------
>
> Key: CASSANDRA-20
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Eric Evans
> Priority: Minor
> Attachments: commons-daemon.patch
>
>
> Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-20) Daemonization of cassandra nodes
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-20?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Evans updated CASSANDRA-20:
--------------------------------
Attachment: commons-daemon.patch
The attached patch adds a CassandraServer-like class that implements the org.apache.commons.daemon.Daemon interface. You need a commons-daemon.jar and architecture specific jsvc wrapper to use it. See http://commons.apache.org/daemon/index.html for more info.
> Daemonization of cassandra nodes
> --------------------------------
>
> Key: CASSANDRA-20
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Eric Evans
> Priority: Minor
> Attachments: commons-daemon.patch
>
>
> Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-20) Daemonization of cassandra nodes
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690098#action_12690098 ]
Jonathan Ellis commented on CASSANDRA-20:
-----------------------------------------
I am not an expert on these things but I rather prefer the approach described here: http://barelyenough.org/blog/2005/03/java-daemon/
to jsvc which requires a c module. (My bad, I didn't realize that at first.)
simplifying things, I don't think we need to worry about the shutdown stuff b/c cassandra is practically a poster boy for what should be crash-only software (http://www.usenix.org/events/hotos03/tech/full_papers/candea/candea_html/index.html) -- it needs to be able to survive crashes, power loss, etc., so adding a "clean" shutdown hook seems to be begging for the recovery code to not get exercised enough. so just killing it as in the existing bin/shutdown seems ok.
(in the old google tree the clean-shutdown code was broken anyway. dunno about this new tree.)
> Daemonization of cassandra nodes
> --------------------------------
>
> Key: CASSANDRA-20
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Eric Evans
> Priority: Minor
> Attachments: commons-daemon.patch
>
>
> Support for daemonization (dropping privileges, closing descriptors, forking, etc) would be nice.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.