You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Gary Dusbabek (JIRA)" <ji...@apache.org> on 2010/11/19 14:44:18 UTC

[jira] Assigned: (CASSANDRA-1756) DatabaseDescriptor static initialization circular reference when initialized through call to StorageService.instance.initClient

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

Gary Dusbabek reassigned CASSANDRA-1756:
----------------------------------------

    Assignee: Gary Dusbabek

> DatabaseDescriptor static initialization circular reference when initialized through call to StorageService.instance.initClient 
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1756
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1756
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Erik Onnen
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: CS-1756, v0-0001-test-that-blocks.txt
>
>
> In trunk, attempting to invoke StorageService.instance.initClient results in an NPE due to static definition field ordering in StorageService and a circular reference from DatabaseDescriptor back into an uninitialized field (scheduledTasks). Changing the ordering of the static fields such that scheduledTasks is defined before the static partitioner fixes the issue.
> I've also marked the scheduledTasks executor as final as it doesn't seem to make sense changing it.
> All tests pass with this change locally.
> I suspect this hasn't surfaced in tests as calling initServer first in the same JVM will allow later calls to initClient to see the correctly defined scheduledTasks fields.
> I'm following the recommended way to do this from ClientOnlyExample, if this isn't the right way to initialize things let me know.

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