Christopher Licata  commented on CASSANDRA-12485:

The following patch for the trunk will, I believe, meet the requirements for 
this issue.  Let me know what your thoughts are.  
| *patch* | *dtest* |
| [12485-trunk | https://github.com/cmlicata/cassandra/commits/12485-trunk ]| 
Coming Soon |

Additionally, could give me some tips on how write the dtests for this as well 
as how to execute them successfully?

Currently, when trying to run the replace_address_test.py dtests I am getting 
the following error:
Inserting 1k entries with rf=3 with stress...
removing ccm cluster test at: 
clearing ssl stores from 
[/var/folders/qv/49qsd41n44q92frdc0sc95j0zcj6z5/T/dtest-d4G7dI] directory

ERROR: fail_without_replace_test (replace_address_test.TestReplaceAddress)
Traceback (most recent call last):
  File "/Users/xle012/cstar/cassandra-dtest/tools/decorators.py", line 46, in 
  File "/Users/xle012/cstar/cassandra-dtest/replace_address_test.py", line 338, 
in fail_without_replace_test
  File "/Users/xle012/cstar/cassandra-dtest/replace_address_test.py", line 127, 
in _insert_data
  File "/Users/xle012/cstar/ccm/ccmlib/node.py", line 1256, in stress
    return handle_external_tool_process(p, ['stress'] + stress_options)
  File "/Users/xle012/cstar/ccm/ccmlib/node.py", line 1982, in 
    raise ToolError(cmd_args, rc, out, err)
ToolError: Subprocess ['stress', 'write', 'n=1k', 'no-warmup', '-schema', 
'replication(factor=3)'] exited with non-zero status; exit status: 1; 
stderr: Error: Could not find or load main class 

Not sure what the cause might be -- I followed the installation and build 
instructions by [~jkni] [here | 

> 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

Reply via email to