Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A3768200B8D for ; Fri, 23 Sep 2016 21:20:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A2135160AD0; Fri, 23 Sep 2016 19:20:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E0986160AD6 for ; Fri, 23 Sep 2016 21:20:21 +0200 (CEST) Received: (qmail 92700 invoked by uid 500); 23 Sep 2016 19:20:20 -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 92623 invoked by uid 99); 23 Sep 2016 19:20:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2016 19:20:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 97EF22C0B09 for ; Fri, 23 Sep 2016 19:20:20 +0000 (UTC) Date: Fri, 23 Sep 2016 19:20:20 +0000 (UTC) From: "Christopher Licata (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-12485) Always require replace_address to replace existing token MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 23 Sep 2016 19:20:22 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15517323#comment-15517323 ] Christopher Licata commented on CASSANDRA-12485: ------------------------------------------------- {quote} You should add a new check on {{StorageService.checkForEndpointCollision}}, similar to the {{isSafeForStartup}} ... \[it\] should check if there are live nodes with the same tokens as the new node and prevent bootstrap in this case. {quote} So it seems as though the new {{containsTokensOfLiveOwners}} \(still working on the name\) method in {{Gossiper}} should simply grab the current node's token list with {{StorageService.getTokens()}} and then iterate through the {{liveEndpoints}} and do something like a {{Collections.disjoint}} to see if there are any common elements in any of the lists. Does that seem correct? > Always require replace_address to replace existing token > -------------------------------------------------------- > > Key: CASSANDRA-12485 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12485 > Project: Cassandra > Issue Type: Improvement > Components: Distributed Metadata > Reporter: Paulo Motta > Priority: Minor > Labels: lhf > > CASSANDRA-10134 prevented replace an existing node unless {{\-Dcassandra.replace_address}} or {{\-Dcassandra.allow_unsafe_replace=true}} is specified. > We should extend this behavior to tokens, preventing a node from joining the ring if another node with the same token already existing in the ring, unless {{\-Dcassandra.replace_address}} or {{\-Dcassandra.allow_unsafe_replace=true}} is specified in order to avoid catastrophic scenarios. > One scenario where this can easily happen is if you replace a node with another node with a different IP, and after some time you restart the original node by mistake. The original node will then take over the tokens of the replaced node (since it has a newer gossip generation). -- This message was sent by Atlassian JIRA (v6.3.4#6332)