cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Williams (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-4460) SystemTable.setBootstrapState always sets bootstrap state to true
Date Wed, 25 Jul 2012 21:53:35 GMT


Brandon Williams updated CASSANDRA-4460:

    Attachment: 4460.txt

bq. it has to be migrated anyway. The table is defined to be boolean currently

Actually, it's only boolean in trunk and we don't need to keep trunk compatible with itself.
 It turns out upgradeSystemData() is handling the 1.1 to trunk transition for us already.

bq.  I chose string as 0, 1, 2 mean nothing to me.

Fair enough.  Attaching a new version which takes all of this into account, and fixes a bug
in setBootstrapState using getBootstrapState instead of the state passed to it.
> SystemTable.setBootstrapState always sets bootstrap state to true
> -----------------------------------------------------------------
>                 Key: CASSANDRA-4460
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>         Attachments: 4460.txt, 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:!default.jspa
For more information on JIRA, see:


View raw message