Return-Path: Delivered-To: apmail-incubator-cassandra-dev-archive@minotaur.apache.org Received: (qmail 49437 invoked from network); 21 Dec 2009 18:46:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Dec 2009 18:46:35 -0000 Received: (qmail 71530 invoked by uid 500); 21 Dec 2009 18:46:35 -0000 Delivered-To: apmail-incubator-cassandra-dev-archive@incubator.apache.org Received: (qmail 71491 invoked by uid 500); 21 Dec 2009 18:46:34 -0000 Mailing-List: contact cassandra-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-dev@incubator.apache.org Received: (qmail 71471 invoked by uid 99); 21 Dec 2009 18:46:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Dec 2009 18:46:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rrabah@playdom.com designates 74.125.149.73 as permitted sender) Received: from [74.125.149.73] (HELO na3sys009aog104.obsmtp.com) (74.125.149.73) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 21 Dec 2009 18:46:25 +0000 Received: from source ([209.85.160.58]) by na3sys009aob104.postini.com ([74.125.148.12]) with SMTP ID DSNKSy/Caw++rbewnRdov8izrpq9F+oWO7D/@postini.com; Mon, 21 Dec 2009 10:46:04 PST Received: by mail-pw0-f58.google.com with SMTP id 2so3396472pwi.17 for ; Mon, 21 Dec 2009 10:46:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.141.23.12 with SMTP id a12mr5327490rvj.158.1261421162076; Mon, 21 Dec 2009 10:46:02 -0800 (PST) Date: Mon, 21 Dec 2009 10:46:02 -0800 Message-ID: Subject: Small HintedHanoffManager improvement? From: Ramzi Rabah To: cassandra-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi guys, before I go ahead and open an enhancement bug for this, I just want to make sure it is valid. In HintedHandOffManager in the part where we deliver a message to the target node: private static boolean sendMessage(InetAddress endPoint, String tableName, String key) throws IOException { if (!FailureDetector.instance().isAlive(endPoint)) { return false; } Table table = Table.open(tableName); RowMutation rm = new RowMutation(tableName, key); for (ColumnFamilyStore cfstore : table.getColumnFamilyStores().values()) { ColumnFamily cf = cfstore.getColumnFamily(new IdentityQueryFilter(key, new QueryPath(cfstore.getColumnFamilyName()))); if (cf != null) rm.add(cf); } Message message = rm.makeRowMutationMessage(); WriteResponseHandler responseHandler = new WriteResponseHandler(1); MessagingService.instance().sendRR(message, new InetAddress[] { endPoint }, responseHandler); ... It seems that we still send a row mutation even if the cf of the row is null. My question is, what is the point of sending a RowMutation with an empty cf. I don't believe this will break anything (if we handle a mutation message with an empty cf properly), but it seems to me like a redundant mutation message sent and processed. On a different note, I have a few questions about HHOM design. HintedHandOffManager seems to send the whole CF for a key, even if the only thing that changed was a value in 1 single column. Will this scale if I have a CF with 1000 columns, and why not only send that one column? And one last question about HHOM, since the node that is handling the Hint might not be (and is probably not) one of the replicas if I understood the code correctly, Will the data written to it ever be cleaned, if I issue a delete later on down the line? My 2 cents :) Ramzi