Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9EA6A910F for ; Wed, 23 May 2012 03:24:47 +0000 (UTC) Received: (qmail 52300 invoked by uid 500); 23 May 2012 03:24:46 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 52069 invoked by uid 500); 23 May 2012 03:24:44 -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 51995 invoked by uid 99); 23 May 2012 03:24:41 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2012 03:24:41 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id EF82214281C for ; Wed, 23 May 2012 03:24:40 +0000 (UTC) Date: Wed, 23 May 2012 03:24:40 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: <1046574230.10434.1337743480986.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1929060412.42406.1336536312281.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281382#comment-13281382 ] Jonathan Ellis commented on CASSANDRA-4227: ------------------------------------------- Sorry for the confusion, I was +1ing the 2nd patch. I'm okay with NPEing if we have a null host on version 12, since that's Not Supposed To Happen. (Alternatively, we could add an assert to make that explicit.) > StorageProxy throws NPEs for when there's no hostids for a target > ----------------------------------------------------------------- > > Key: CASSANDRA-4227 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4227 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Dave Brosius > Priority: Trivial > Fix For: 1.2 > > Attachments: 4227_drop_hints.txt, 4227_guard_against_npes_for_old_gossip_versions.diff > > > On trunk... > if there is no host id due to an old node, an info log is generated, but the code continues to use the null host id causing NPEs in decompose... Should this bypass this code, or perhaps can the plain ip address be used in this case? don't know. > as follows... > UUID hostId = StorageService.instance.getTokenMetadata().getHostId(target); > if ((hostId == null) && (Gossiper.instance.getVersion(target) < MessagingService.VERSION_12)) > logger.info("Unable to store hint for host with missing ID, {} (old node?)", target.toString()); > RowMutation hintedMutation = RowMutation.hintFor(mutation, ByteBuffer.wrap(UUIDGen.decompose(hostId))); > hintedMutation.apply(); -- 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