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 891EADD7B for ; Wed, 1 Aug 2012 18:52:04 +0000 (UTC) Received: (qmail 37270 invoked by uid 500); 1 Aug 2012 18:52:04 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 37221 invoked by uid 500); 1 Aug 2012 18:52:04 -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 37031 invoked by uid 99); 1 Aug 2012 18:52:04 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2012 18:52:03 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id A4C9C14285B for ; Wed, 1 Aug 2012 18:52:03 +0000 (UTC) Date: Wed, 1 Aug 2012 18:52:03 +0000 (UTC) From: "Eric Dong (JIRA)" To: commits@cassandra.apache.org Message-ID: <671500061.1733.1343847123680.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (CASSANDRA-4479) Multiple phi_convict_threshold fields not all settable via JMX MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Eric Dong created CASSANDRA-4479: ------------------------------------ Summary: Multiple phi_convict_threshold fields not all settable via JMX Key: CASSANDRA-4479 URL: https://issues.apache.org/jira/browse/CASSANDRA-4479 Project: Cassandra Issue Type: Bug Affects Versions: 1.1.2 Reporter: Eric Dong If a setting is configurable both via cassandra.yaml and JMX, the two should be consistent, but that is not the case for phi_convict_threshold. I'm trying to set phi_convict_threshold via JMX, which sets FailureDetector.phiConvictThreshold_, but this doesn't update Config.phi_convict_threshold, which gets its value from cassandra.yaml when starting up. Some places, such as FailureDetector.interpret(InetAddress), use FailureDetector.phiConvictThreshold_; others, such as AntiEntropyService.line 813 in cassandra-1.1.2, use Config.phi_convict_threshold: {code} // We want a higher confidence in the failure detection than usual because failing a repair wrongly has a high cost. if (phi < 2 * DatabaseDescriptor.getPhiConvictThreshold()) return; {code} where DatabaseDescriptor.getPhiConvictThreshold() returns Conf.phi_convict_threshold. So, it looks like there are cases where a value is stored in multiple places, and setting the value via JMX doesn't set all of them. I'd say there should only be a single place where a configuration parameter is stored, and that single field: * should read in the value from cassandra.yaml, optionally falling back to a sane default * should be the field that the JMX attribute reads and sets, and * any place that needs the current global setting should get it from that field. However, there could be cases where you read in a global value at the start of a task and keep that value locally until the end of the task. Also, anything settable via JMX should be volatile or set via a synchronized setter, or else according to the Java memory model other threads may be stuck with the old setting. -- 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