Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 74793 invoked from network); 19 Nov 2010 20:06:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Nov 2010 20:06:09 -0000 Received: (qmail 68671 invoked by uid 500); 19 Nov 2010 20:06:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 68650 invoked by uid 500); 19 Nov 2010 20:06:40 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 68635 invoked by uid 99); 19 Nov 2010 20:06:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Nov 2010 20:06:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Nov 2010 20:06:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAJK6GUR023660 for ; Fri, 19 Nov 2010 20:06:16 GMT Message-ID: <16932961.202911290197176724.JavaMail.jira@thor> Date: Fri, 19 Nov 2010 15:06:16 -0500 (EST) From: "Hudson (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Commented: (CASSANDRA-1756) DatabaseDescriptor static initialization circular reference when initialized through call to StorageService.instance.initClient In-Reply-To: <6938596.183161290117579523.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-1756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933948#action_12933948 ] Hudson commented on CASSANDRA-1756: ----------------------------------- Integrated in Cassandra-0.7 #19 (See [https://hudson.apache.org/hudson/job/Cassandra-0.7/19/]) > 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, v1-0001-fix-cicular-initialization-problem-between-StorageServ.txt, v1-0002-StorageService.initClient-unit-test-that-never-finishe.txt, v1-0003-DynamicEndpointSnitch-shouldn-t-update-if-SS-isn-t-ini.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.