You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sandeep Tata (JIRA)" <ji...@apache.org> on 2009/03/16 19:17:50 UTC

[jira] Created: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

HashingStrategy does not default to RANDOM if the conf file is missing this entry
---------------------------------------------------------------------------------

                 Key: CASSANDRA-6
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
             Project: Cassandra
          Issue Type: Bug
         Environment: all
            Reporter: Sandeep Tata
            Priority: Minor


When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:

DatabaseDescriptor.java:147

hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

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

Jonathan Ellis commented on CASSANDRA-6:
----------------------------------------

attached patches that refuse to start up when things are broken.  (this means we don't need the "default" value patch anymore.)

> HashingStrategy does not default to RANDOM if the conf file is missing this entry
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: all
>            Reporter: Sandeep Tata
>            Assignee: Jonathan Ellis
>            Priority: Minor
>         Attachments: 0001-don-t-manually-create-commitlog-directory-cassandra.patch, 0002-sanity-check-configuration-before-starting.patch, default_values_patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:
> DatabaseDescriptor.java:147
> hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

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

Jonathan Ellis updated CASSANDRA-6:
-----------------------------------

    Attachment: 0002-sanity-check-configuration-before-starting.patch

> HashingStrategy does not default to RANDOM if the conf file is missing this entry
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: all
>            Reporter: Sandeep Tata
>            Assignee: Jonathan Ellis
>            Priority: Minor
>         Attachments: 0001-don-t-manually-create-commitlog-directory-cassandra.patch, 0002-sanity-check-configuration-before-starting.patch, default_values_patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:
> DatabaseDescriptor.java:147
> hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

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

Jonathan Ellis commented on CASSANDRA-6:
----------------------------------------

Avinash applied Sandeep's patch for this specific issue but more generally we need to add some checks to startup for configuration sanity and abort if things are too badly broken.  (Missing hash fn would fall into that category.)

> HashingStrategy does not default to RANDOM if the conf file is missing this entry
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: all
>            Reporter: Sandeep Tata
>            Assignee: Jonathan Ellis
>            Priority: Minor
>         Attachments: default_values_patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:
> DatabaseDescriptor.java:147
> hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

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

Eric Evans commented on CASSANDRA-6:
------------------------------------

Patch 0002 adds an unused import (org.apache.cassandra.db.ColumnFamilyStore), and I'm assuming that the call to xmlUtils.getAttributeValue() should instead be XMLUtils.getAttributeValue().

Other than those two minor issues, it looks good to me.

> HashingStrategy does not default to RANDOM if the conf file is missing this entry
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: all
>            Reporter: Sandeep Tata
>            Assignee: Jonathan Ellis
>            Priority: Minor
>         Attachments: 0001-don-t-manually-create-commitlog-directory-cassandra.patch, 0002-sanity-check-configuration-before-starting.patch, default_values_patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:
> DatabaseDescriptor.java:147
> hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

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

Sandeep Tata updated CASSANDRA-6:
---------------------------------

    Attachment: default_values_patch.txt

Here's a very simple patch that fixes this issue.

Added XMLUtils.getNodeValue with a default value arg, and used this in DatabaseDescriptor.

> HashingStrategy does not default to RANDOM if the conf file is missing this entry
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: all
>            Reporter: Sandeep Tata
>            Priority: Minor
>         Attachments: default_values_patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:
> DatabaseDescriptor.java:147
> hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

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

Jonathan Ellis reassigned CASSANDRA-6:
--------------------------------------

    Assignee: Jonathan Ellis

> HashingStrategy does not default to RANDOM if the conf file is missing this entry
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: all
>            Reporter: Sandeep Tata
>            Assignee: Jonathan Ellis
>            Priority: Minor
>         Attachments: default_values_patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:
> DatabaseDescriptor.java:147
> hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

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

Jonathan Ellis updated CASSANDRA-6:
-----------------------------------

    Attachment: 0001-don-t-manually-create-commitlog-directory-cassandra.patch

> HashingStrategy does not default to RANDOM if the conf file is missing this entry
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: all
>            Reporter: Sandeep Tata
>            Assignee: Jonathan Ellis
>            Priority: Minor
>         Attachments: 0001-don-t-manually-create-commitlog-directory-cassandra.patch, 0002-sanity-check-configuration-before-starting.patch, default_values_patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:
> DatabaseDescriptor.java:147
> hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CASSANDRA-6) HashingStrategy does not default to RANDOM if the conf file is missing this entry

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

Jonathan Ellis resolved CASSANDRA-6.
------------------------------------

    Resolution: Fixed

committed with suggested improvements

> HashingStrategy does not default to RANDOM if the conf file is missing this entry
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: all
>            Reporter: Sandeep Tata
>            Assignee: Jonathan Ellis
>            Priority: Minor
>         Attachments: 0001-don-t-manually-create-commitlog-directory-cassandra.patch, 0002-sanity-check-configuration-before-starting.patch, default_values_patch.txt
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When the conf file does not have a line for hashingstrategy, the value does not default to RANDOM, instead it goes to null because of:
> DatabaseDescriptor.java:147
> hashingStrategy_ = xmlUtils.getNodeValue("/Storage/HashingStrategy");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.