Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
BaurzhanSakhariev committed Dec 20, 2024
1 parent 8eac832 commit 1be778e
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions tests/bwc/test_rolling_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,7 @@

ROLLING_UPGRADES = (
# 4.0.0 -> 4.0.1 -> 4.0.2 don't support rolling upgrades due to a bug
UpgradePath('4.0.2', '4.0.x'),
UpgradePath('4.0.x', '4.1.0'),
UpgradePath('4.1.0', '4.1.x'),
UpgradePath('4.1.x', '4.2.x'),
UpgradePath('4.2.x', '4.3.x'),
UpgradePath('4.3.x', '4.4.x'),
UpgradePath('4.4.x', '4.5.x'),
UpgradePath('4.5.x', '4.6.x'),
UpgradePath('4.6.x', '4.7.x'),
UpgradePath('4.7.x', '4.8.x'),
UpgradePath('4.8.x', '5.0.x'),
UpgradePath('5.0.x', '5.1.x'),
UpgradePath('5.1.x', '5.2.x'),
UpgradePath('5.2.x', '5.3.x'),
UpgradePath('5.3.x', '5.4.x'),
UpgradePath('5.4.x', '5.5.x'),
UpgradePath('5.5.x', '5.6.x'),
UpgradePath('5.6.x', '5.7.x'),
UpgradePath('5.7.x', '5.8.x'),
UpgradePath('5.8.x', '5.9.x'),
UpgradePath('5.9.x', 'latest-nightly')
)


Expand Down Expand Up @@ -90,7 +70,7 @@ def _test_rolling_upgrade(self, path, nodes):
value INT
) CLUSTERED INTO {shards} SHARDS
PARTITIONED BY (id)
WITH (number_of_replicas=0, "write.wait_for_active_shards"=1)
WITH (number_of_replicas=0, "write.wait_for_active_shards"=1, "warmer.enabled" = true)
''')
c.execute("INSERT INTO doc.parted (id, value) VALUES (1, 1)")
# Add the shards of the new partition primaries
Expand Down Expand Up @@ -186,15 +166,22 @@ def _test_rolling_upgrade(self, path, nodes):
c.execute(
"INSERT INTO doc.t1 (type, value, title, author) VALUES (3, 3, 'some title', {name='nothing to see, move on'})")

# Ensure that inserts, which will create a new partition, are working while upgrading
c.execute("INSERT INTO doc.parted (id, value) VALUES (?, ?)", [idx + 10, idx + 10])
# Add the shards of the new partition primaries
expected_active_shards += shards
for i in range(0, 99):
# Ensure that inserts, which will create a new partition, are working while upgrading
c.execute("INSERT INTO doc.parted (id, value) VALUES (?, ?)", [100 * idx + i, i])
# Add the shards of the new partition primaries
expected_active_shards += shards

# Finally validate that all shards (primaries and replicas) of all partitions are started
# and writes into the partitioned table while upgrading were successful
with connect(cluster.node().http_url, error_trace=True) as conn:
c = conn.cursor()

# Ensure that inserts, which will create a new partition, are working after upgrade
c.execute("INSERT INTO doc.parted (id, value) VALUES (?, ?)", [10000, 10000])
# Add the shards of the new partition primaries
expected_active_shards += shards

wait_for_active_shards(c, expected_active_shards)
c.execute('''
REFRESH TABLE doc.parted
Expand Down

0 comments on commit 1be778e

Please sign in to comment.