cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-4460) SystemTable.setBootstrapState always sets bootstrap state to true
Date Wed, 25 Jul 2012 00:27:34 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-4460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dave Brosius updated CASSANDRA-4460:
------------------------------------

    Attachment: use_bootstrap_enum_strings.txt

switch the systemtable.bootstrap field to be text and hold BootstrapState.name() so that the
schema is more readable and easier to mutate in the future, if needed.

I'm not sure how upgrades from old schema generally is handled, that part still needs to be
added to the patch.
                
> SystemTable.setBootstrapState always sets bootstrap state to true
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-4460
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4460
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2
>            Reporter: Dave Brosius
>            Priority: Trivial
>         Attachments: use_bootstrap_enum_strings.txt
>
>
>     public static void setBootstrapState(BootstrapState state)
>     {
>         String req = "INSERT INTO system.%s (key, bootstrapped) VALUES ('%s', '%b')";
>         processInternal(String.format(req, LOCAL_CF, LOCAL_KEY, getBootstrapState()));
>         forceBlockingFlush(LOCAL_CF);
>     }
> Third parameter %b is set from getBootstrapState() which returns an enum, thus %b collapses
to null/non null checks. This would seem then to always set it to true.

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

        

Mime
View raw message