This is an automated email from the ASF dual-hosted git repository. blerer pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
commit a53506281883841dc824e48595668771728a7258 Author: Benjamin Lerer <[email protected]> AuthorDate: Mon Jun 21 11:28:49 2021 +0200 Remove unecessary DROP COMPACT STORAGE --- upgrade_tests/cql_tests.py | 169 +++------------------ upgrade_tests/drop_compact_storage_upgrade_test.py | 1 + upgrade_tests/paging_test.py | 6 - upgrade_tests/storage_engine_upgrade_test.py | 18 +-- upgrade_tests/thrift_upgrade_test.py | 6 +- upgrade_tests/upgrade_supercolumns_test.py | 2 - 6 files changed, 28 insertions(+), 174 deletions(-) diff --git a/upgrade_tests/cql_tests.py b/upgrade_tests/cql_tests.py index eac6ec2..e6a3b97 100644 --- a/upgrade_tests/cql_tests.py +++ b/upgrade_tests/cql_tests.py @@ -132,10 +132,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE users DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE users") @@ -147,25 +143,16 @@ class TestCQL(UpgradeTester): # Queries assert_one(cursor, "SELECT firstname, lastname FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000", ['Frodo', 'Baggins']) - if self.is_40_or_greater(): - assert_one(cursor, "SELECT * FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000", - [UUID('550e8400-e29b-41d4-a716-446655440000'), None, 32, 'Frodo', 'Baggins', None]) - assert_one(cursor, "SELECT * FROM users WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479", - [UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), None, 33, 'Samwise', 'Gamgee', None]) - assert_all(cursor, "SELECT * FROM users", - [[UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), None, 33, 'Samwise', 'Gamgee', None], - [UUID('550e8400-e29b-41d4-a716-446655440000'), None, 32, 'Frodo', 'Baggins', None]]) - else: - assert_one(cursor, "SELECT * FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000", - [UUID('550e8400-e29b-41d4-a716-446655440000'), 32, 'Frodo', 'Baggins']) - # FIXME There appears to be some sort of problem with reusable cells - # when executing this query. It's likely that CASSANDRA-9705 will - # fix this, but I'm not 100% sure. - assert_one(cursor, "SELECT * FROM users WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479", - [UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 33, 'Samwise', 'Gamgee']) - assert_all(cursor, "SELECT * FROM users", - [[UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 33, 'Samwise', 'Gamgee'], - [UUID('550e8400-e29b-41d4-a716-446655440000'), 32, 'Frodo', 'Baggins']]) + assert_one(cursor, "SELECT * FROM users WHERE userid = 550e8400-e29b-41d4-a716-446655440000", + [UUID('550e8400-e29b-41d4-a716-446655440000'), 32, 'Frodo', 'Baggins']) + # FIXME There appears to be some sort of problem with reusable cells + # when executing this query. It's likely that CASSANDRA-9705 will + # fix this, but I'm not 100% sure. + assert_one(cursor, "SELECT * FROM users WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479", + [UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 33, 'Samwise', 'Gamgee']) + assert_all(cursor, "SELECT * FROM users", + [[UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 33, 'Samwise', 'Gamgee'], + [UUID('550e8400-e29b-41d4-a716-446655440000'), 32, 'Frodo', 'Baggins']]) # Test batch inserts cursor.execute(""" @@ -177,12 +164,8 @@ class TestCQL(UpgradeTester): APPLY BATCH """) - if self.is_40_or_greater(): - assert_all(cursor, "SELECT * FROM users", [[UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), None, 37, None, None, None], - [UUID('550e8400-e29b-41d4-a716-446655440000'), None, 36, None, None, None]]) - else: - assert_all(cursor, "SELECT * FROM users", [[UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 37, None, None], - [UUID('550e8400-e29b-41d4-a716-446655440000'), 36, None, None]]) + assert_all(cursor, "SELECT * FROM users", [[UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479'), 37, None, None], + [UUID('550e8400-e29b-41d4-a716-446655440000'), 36, None, None]]) def test_dynamic_cf(self): """ Test non-composite dynamic CF syntax """ @@ -197,10 +180,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE clicks DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE clicks") @@ -240,10 +219,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE connections DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE connections") @@ -255,12 +230,8 @@ class TestCQL(UpgradeTester): cursor.execute("UPDATE connections SET time = 24 WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.2' AND port = 80") # we don't have to include all of the clustering columns (see CASSANDRA-7990) - if self.is_40_or_greater(): - cursor.execute("INSERT INTO connections (userid, ip, port, time) VALUES (f47ac10b-58cc-4372-a567-0e02b2c3d479, '192.168.0.3', 80, 42)") - cursor.execute("UPDATE connections SET time = 42 WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.4' AND port = 90") - else: - cursor.execute("INSERT INTO connections (userid, ip, time) VALUES (f47ac10b-58cc-4372-a567-0e02b2c3d479, '192.168.0.3', 42)") - cursor.execute("UPDATE connections SET time = 42 WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.4'") + cursor.execute("INSERT INTO connections (userid, ip, time) VALUES (f47ac10b-58cc-4372-a567-0e02b2c3d479, '192.168.0.3', 42)") + cursor.execute("UPDATE connections SET time = 42 WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.4'") # Queries assert_all(cursor, "SELECT ip, port, time FROM connections WHERE userid = 550e8400-e29b-41d4-a716-446655440000", @@ -274,23 +245,17 @@ class TestCQL(UpgradeTester): assert_none(cursor, "SELECT ip, port, time FROM connections WHERE userid = 550e8400-e29b-41d4-a716-446655440000 and ip > '192.168.0.2'") - if self.is_40_or_greater(): - assert_one(cursor, "SELECT ip, port, time FROM connections WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.3'", - ['192.168.0.3', 80, 42]) - assert_one(cursor, "SELECT ip, port, time FROM connections WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.4'", - ['192.168.0.4', 90, 42]) - else: - assert_one(cursor, "SELECT ip, port, time FROM connections WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.3'", - ['192.168.0.3', None, 42]) - assert_one(cursor, "SELECT ip, port, time FROM connections WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.4'", - ['192.168.0.4', None, 42]) + assert_one(cursor, "SELECT ip, port, time FROM connections WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.3'", + ['192.168.0.3', None, 42]) + assert_one(cursor, "SELECT ip, port, time FROM connections WHERE userid = f47ac10b-58cc-4372-a567-0e02b2c3d479 AND ip = '192.168.0.4'", + ['192.168.0.4', None, 42]) # Deletion cursor.execute("DELETE time FROM connections WHERE userid = 550e8400-e29b-41d4-a716-446655440000 AND ip = '192.168.0.2' AND port = 80") res = list(cursor.execute("SELECT * FROM connections WHERE userid = 550e8400-e29b-41d4-a716-446655440000")) #Without compact storage deleting just the column leaves the row behind - assert_length_equal(res, 3 if self.is_40_or_greater() else 2) + assert_length_equal(res, 2) cursor.execute("DELETE FROM connections WHERE userid = 550e8400-e29b-41d4-a716-446655440000") assert_none(cursor, "SELECT * FROM connections WHERE userid = 550e8400-e29b-41d4-a716-446655440000") @@ -351,10 +316,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE clicks DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE clicks") @@ -382,10 +343,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE clicks DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE clicks") @@ -478,10 +435,6 @@ class TestCQL(UpgradeTester): else: cursor.execute(create_table_query + ' WITH COMPACT STORAGE') - # 4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE clicks DROP COMPACT STORAGE") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE clicks") @@ -577,10 +530,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test") @@ -629,11 +578,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test1 DROP COMPACT STORAGE;") - cursor.execute("ALTER TABLE test2 DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test1") @@ -683,10 +627,6 @@ class TestCQL(UpgradeTester): ); """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test1 DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test1") @@ -738,11 +678,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE Test DROP COMPACT STORAGE;") - cursor.execute("ALTER TABLE test2 DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test") @@ -980,10 +915,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE testcf2 DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE testcf") @@ -1756,10 +1687,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test2 DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test") @@ -1779,8 +1706,7 @@ class TestCQL(UpgradeTester): cursor.execute(q, (k, c)) query = "SELECT * FROM test2" - expected = [[x, y, None] for x in range(0, 2) for y in range(0, 2)] if self.is_40_or_greater() else [ - [x, y] for x in range(0, 2) for y in range(0, 2)] + expected = [[x, y] for x in range(0, 2) for y in range(0, 2)] assert_all(cursor, query, expected) def test_no_clustering(self): @@ -2132,11 +2058,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test1 DROP COMPACT STORAGE;") - cursor.execute("ALTER TABLE test2 DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test1") @@ -2202,10 +2123,6 @@ class TestCQL(UpgradeTester): AND CLUSTERING ORDER BY(c1 DESC, c2 DESC); """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test") @@ -2596,10 +2513,6 @@ class TestCQL(UpgradeTester): cursor.execute(create) - #4.0 doesn't support compact storage - if compact and self.is_40_or_greater(): - cursor.execute("ALTER TABLE zipcodes DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE zipcodes") @@ -2654,10 +2567,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test") @@ -2782,16 +2691,12 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE; """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE bar DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE bar") cursor.execute("INSERT INTO bar (id, i) VALUES (1, 2);") - assert_one(cursor, "SELECT * FROM bar", [1, None, 2, None] if self.is_40_or_greater() else [1, 2]) + assert_one(cursor, "SELECT * FROM bar", [1, 2]) def test_query_compact_tables_during_upgrade(self): """ @@ -2819,10 +2724,6 @@ class TestCQL(UpgradeTester): [(i, i) for i in range(100)]) self.cluster.flush() - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE t1 DROP COMPACT STORAGE;") - def check_read_all(cursor): read_count = 0 # first read each row separately - obviously, we should be able to retrieve all 100 @@ -3376,10 +3277,6 @@ class TestCQL(UpgradeTester): # Same test, but for compact cursor.execute("CREATE TABLE test_compact (k1 int, k2 int, v int, PRIMARY KEY (k1, k2)) WITH COMPACT STORAGE") - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test_compact DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test") @@ -3450,11 +3347,6 @@ class TestCQL(UpgradeTester): # Test a 'wide row' thrift table. cursor.execute('CREATE TABLE wide (pk int, name text, val int, PRIMARY KEY(pk, name)) WITH COMPACT STORAGE') - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE compact DROP COMPACT STORAGE;") - cursor.execute("ALTER TABLE wide DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE regular") @@ -4421,10 +4313,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE lock DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE lock") @@ -4997,10 +4885,6 @@ class TestCQL(UpgradeTester): ) WITH COMPACT STORAGE """) - #4.0 doesn't support compact storage - if self.is_40_or_greater(): - cursor.execute("ALTER TABLE test DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old")) cursor.execute("TRUNCATE test") @@ -5012,14 +4896,9 @@ class TestCQL(UpgradeTester): assert_all(cursor, "SELECT v FROM test WHERE k=0 AND v > 0 AND v <= 4 LIMIT 2", [[1], [2]]) assert_all(cursor, "SELECT v FROM test WHERE k=0 AND v > -1 AND v <= 4 LIMIT 2", [[0], [1]]) - if self.is_40_or_greater(): - assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > 0 AND v <= 4 LIMIT 2", [[0, 1, None], [0, 2, None]]) - assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > -1 AND v <= 4 LIMIT 2", [[0, 0, None], [0, 1, None]]) - assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > 0 AND v <= 4 LIMIT 6", [[0, 1, None], [0, 2, None], [0, 3, None], [1, 1, None], [1, 2, None], [1, 3, None]]) - else: - assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > 0 AND v <= 4 LIMIT 2", [[0, 1], [0, 2]]) - assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > -1 AND v <= 4 LIMIT 2", [[0, 0], [0, 1]]) - assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > 0 AND v <= 4 LIMIT 6", [[0, 1], [0, 2], [0, 3], [1, 1], [1, 2], [1, 3]]) + assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > 0 AND v <= 4 LIMIT 2", [[0, 1], [0, 2]]) + assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > -1 AND v <= 4 LIMIT 2", [[0, 0], [0, 1]]) + assert_all(cursor, "SELECT * FROM test WHERE k IN (0, 1, 2) AND v > 0 AND v <= 4 LIMIT 6", [[0, 1], [0, 2], [0, 3], [1, 1], [1, 2], [1, 3]]) # This doesn't work -- see #7059 # assert_all(cursor, "SELECT * FROM test WHERE v > 1 AND v <= 3 LIMIT 6 ALLOW FILTERING", [[1, 2], [1, 3], [0, 2], [0, 3], [2, 2], [2, 3]]) diff --git a/upgrade_tests/drop_compact_storage_upgrade_test.py b/upgrade_tests/drop_compact_storage_upgrade_test.py index 848aab9..d242de1 100644 --- a/upgrade_tests/drop_compact_storage_upgrade_test.py +++ b/upgrade_tests/drop_compact_storage_upgrade_test.py @@ -50,6 +50,7 @@ class TestDropCompactStorage(Tester): node.stop(wait_other_notice=False) node.set_install_dir(version=to_version) + node.set_configuration_options(values={'enable_drop_compact_storage': 'true'}) node.start(wait_other_notice=False, wait_for_binary_proto=False, verbose=False) @since('3.0', max_version='3.11') diff --git a/upgrade_tests/paging_test.py b/upgrade_tests/paging_test.py index 7c3bd37..57106b0 100644 --- a/upgrade_tests/paging_test.py +++ b/upgrade_tests/paging_test.py @@ -471,9 +471,6 @@ class TestPagingData(BasePagingTester, PageAssertionMixin): ) WITH COMPACT STORAGE; """) - if testing_compact_storage and self.upgrade_is_version_4_or_greater(): # 4.0 doesn't support compact storage - cursor.execute("ALTER TABLE test2 DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying %s node" % ("upgraded" if is_upgraded else "old",)) cursor.execute("TRUNCATE test") @@ -525,9 +522,6 @@ class TestPagingData(BasePagingTester, PageAssertionMixin): ) WITH COMPACT STORAGE; """) - if testing_compact_storage and self.upgrade_is_version_4_or_greater(): # 4.0 doesn't support compact storage - cursor.execute("ALTER TABLE test2 DROP COMPACT STORAGE;") - for is_upgraded, cursor in self.do_upgrade(cursor): logger.debug("Querying %s node" % ("upgraded" if is_upgraded else "old",)) cursor.execute("TRUNCATE test") diff --git a/upgrade_tests/storage_engine_upgrade_test.py b/upgrade_tests/storage_engine_upgrade_test.py index 8112fa2..f5303fc 100644 --- a/upgrade_tests/storage_engine_upgrade_test.py +++ b/upgrade_tests/storage_engine_upgrade_test.py @@ -140,10 +140,6 @@ class TestStorageEngineUpgrade(Tester): for r in range(ROWS): session.execute("INSERT INTO t(k, t, v) VALUES ({n}, {r}, {r})".format(n=n, r=r)) - #4.0 doesn't support compact storage - if compact_storage and self.dtest_config.cassandra_version_from_build >= MAJOR_VERSION_4: - session.execute("ALTER TABLE t DROP COMPACT STORAGE;") - session = self._do_upgrade() for n in range(PARTITIONS): @@ -213,25 +209,15 @@ class TestStorageEngineUpgrade(Tester): for n in range(PARTITIONS): session.execute("INSERT INTO t(k, v1, v2, v3, v4) VALUES ({}, {}, {}, {}, {})".format(n, n + 1, n + 2, n + 3, n + 4)) - is40 = self.dtest_config.cassandra_version_from_build >= MAJOR_VERSION_4 - if compact_storage and is40: - session.execute("ALTER TABLE t DROP COMPACT STORAGE;") - session = self._do_upgrade() - def maybe_add_compact_columns(expected): - if is40 and compact_storage: - expected.insert(1, None) - expected.append(None) - return expected - for n in range(PARTITIONS): - assert_one(session, "SELECT * FROM t WHERE k = {}".format(n), maybe_add_compact_columns([n, n + 1, n + 2, n + 3, n + 4])) + assert_one(session, "SELECT * FROM t WHERE k = {}".format(n), [n, n + 1, n + 2, n + 3, n + 4]) self.cluster.compact() for n in range(PARTITIONS): - assert_one(session, "SELECT * FROM t WHERE k = {}".format(n), maybe_add_compact_columns([n, n + 1, n + 2, n + 3, n + 4])) + assert_one(session, "SELECT * FROM t WHERE k = {}".format(n), [n, n + 1, n + 2, n + 3, n + 4]) def test_upgrade_with_statics(self): self.upgrade_with_statics(rows=10) diff --git a/upgrade_tests/thrift_upgrade_test.py b/upgrade_tests/thrift_upgrade_test.py index 3da44f7..0e33de6 100644 --- a/upgrade_tests/thrift_upgrade_test.py +++ b/upgrade_tests/thrift_upgrade_test.py @@ -380,7 +380,6 @@ class TestUpgradeTo40(Tester): Thrift is dead in 4.0. However, we still want to ensure users that used thrift in 3.0 or earlier have an upgrade path to 4.0 and this class provides tests cases for this. - Note that we don't want to run this if the "current" version (the one we're upgrading to) is not 4.0 or more, as the tests makes assumptions on that. """ @@ -389,7 +388,6 @@ class TestUpgradeTo40(Tester): Prepare the test, starting a cluster on the initial version, creating a keyspace (named 'ks') and returning a CQL and a thrift connection to the first node (and set on the created keyspace). - :param start_version: the version to set the node at initially. :param num_nodes: the number of nodes to use. :param rf: replication factor for the keyspace created. @@ -427,7 +425,6 @@ class TestUpgradeTo40(Tester): """ Upgrade all the nodes in the cluster to the "current" version (so 4.0+) in a rolling fashion. - :param after_each_upgrade: if not None, a function that is called with 2 arguments (in that order): - the index of the node we just upgraded. @@ -563,7 +560,6 @@ class TestThrift(UpgradeTester): """ Verify dense and sparse supercolumn functionality with and without renamed columns in 3.X after upgrading from 2.x. - @jira_ticket CASSANDRA-12373 """ @@ -738,4 +734,4 @@ for spec in specs: cls = type(gen_class_name, (TestThrift,), spec) if not upgrade_applies_to_env: add_skip(cls, 'test not applicable to env.') - globals()[gen_class_name] = cls + globals()[gen_class_name] = cls \ No newline at end of file diff --git a/upgrade_tests/upgrade_supercolumns_test.py b/upgrade_tests/upgrade_supercolumns_test.py index f620e70..af22e80 100644 --- a/upgrade_tests/upgrade_supercolumns_test.py +++ b/upgrade_tests/upgrade_supercolumns_test.py @@ -128,8 +128,6 @@ class TestSCUpgrade(Tester): self.verify_with_thrift() for version in upgrade_path: - if LooseVersion(version.family) >= CASSANDRA_4_0: - session.execute("ALTER TABLE supcols.cols DROP COMPACT STORAGE") self.upgrade_to_version(version.version) session = self.patient_exclusive_cql_connection(node1) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
