You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2018/07/26 17:32:06 UTC

[1/2] cassandra-dtest git commit: relocate tokens to their proper places after moving

Repository: cassandra-dtest
Updated Branches:
  refs/heads/master f45a06b2e -> b9d155615


relocate tokens to their proper places after moving


Project: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/commit/3a338c7b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/tree/3a338c7b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/diff/3a338c7b

Branch: refs/heads/master
Commit: 3a338c7bac3668da4ceb27f97eab42c5ccd31d03
Parents: f45a06b
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Jan 12 16:05:36 2018 +0100
Committer: Jason Brown <ja...@gmail.com>
Committed: Thu Jul 26 10:30:23 2018 -0700

----------------------------------------------------------------------
 topology_test.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/3a338c7b/topology_test.py
----------------------------------------------------------------------
diff --git a/topology_test.py b/topology_test.py
index 47426f0..a00c2ca 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):
@@ -292,10 +297,11 @@ class TestTopology(Tester):
 
         # Now the load should be basically even
         sizes = [node.data_size() for node in [node1, node2, node3]]
+        debug("sizes = %s" % sizes)
 
-        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


[2/2] cassandra-dtest git commit: Deselect offheap tests when they are marked as 'no_offheap_memtables'

Posted by ja...@apache.org.
Deselect offheap tests when they are marked as 'no_offheap_memtables'

patch by jasobrown; reviewed by Jordan West for CASSANDRA-14542


Project: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/commit/b9d15561
Tree: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/tree/b9d15561
Diff: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/diff/b9d15561

Branch: refs/heads/master
Commit: b9d15561512565ca58313c458701cc677f2f53b0
Parents: 3a338c7
Author: Jason Brown <ja...@gmail.com>
Authored: Sun Jun 24 15:14:42 2018 -0700
Committer: Jason Brown <ja...@gmail.com>
Committed: Thu Jul 26 10:31:08 2018 -0700

----------------------------------------------------------------------
 conftest.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/b9d15561/conftest.py
----------------------------------------------------------------------
diff --git a/conftest.py b/conftest.py
index 84ece62..0040ec6 100644
--- a/conftest.py
+++ b/conftest.py
@@ -470,7 +470,9 @@ def pytest_collection_modifyitems(items, config):
             if not config.getoption("--execute-upgrade-tests"):
                 deselect_test = True
 
-        # todo kjkj: deal with no_offheap_memtables mark
+        if item.get_marker("no_offheap_memtables"):
+            if config.getoption("use_off_heap_memtables"):
+                deselect_test = True
 
         if deselect_test:
             deselected_items.append(item)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org