You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2018/07/27 07:43:58 UTC
cassandra-dtest git commit: Relocate tokens to their proper places
after moving
Repository: cassandra-dtest
Updated Branches:
refs/heads/master 73591db24 -> 2548ec6e6
Relocate tokens to their proper places after moving
Patch by marcuse; reviewed by Jason Brown for CASSANDRA-14156
Project: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/commit/2548ec6e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/tree/2548ec6e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/diff/2548ec6e
Branch: refs/heads/master
Commit: 2548ec6e664bf118943ea07d070c5bb863f90426
Parents: 73591db
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Jan 12 16:05:36 2018 +0100
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Fri Jul 27 09:37:39 2018 +0200
----------------------------------------------------------------------
topology_test.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/2548ec6e/topology_test.py
----------------------------------------------------------------------
diff --git a/topology_test.py b/topology_test.py
index 47426f0..1748f1d 100644
--- a/topology_test.py
+++ b/topology_test.py
@@ -283,8 +283,13 @@ class TestTopology(Tester):
move_node(node3, balancing_tokens[2])
time.sleep(1)
-
cluster.cleanup()
+ for node in cluster.nodelist():
+ # after moving nodes we need to relocate any tokens in the wrong places, and after doing that
+ # we might have overlapping tokens on the disks, so run a major compaction to get balance even
+ if cluster.version() >= '3.2':
+ node.nodetool("relocatesstables")
+ node.nodetool("compact")
# Check we can get all the keys
for n in range(0, 30000):
@@ -293,9 +298,9 @@ class TestTopology(Tester):
# Now the load should be basically even
sizes = [node.data_size() for node in [node1, node2, node3]]
- assert_almost_equal(sizes[0], sizes[1])
- assert_almost_equal(sizes[0], sizes[2])
- assert_almost_equal(sizes[1], sizes[2])
+ assert_almost_equal(sizes[0], sizes[1], error=0.05)
+ assert_almost_equal(sizes[0], sizes[2], error=0.05)
+ assert_almost_equal(sizes[1], sizes[2], error=0.05)
@pytest.mark.no_vnodes
def test_decommission(self):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org