Skip to content

Commit 1be778e

Browse files
debug
1 parent 8eac832 commit 1be778e

File tree

1 file changed

+12
-25
lines changed

1 file changed

+12
-25
lines changed

tests/bwc/test_rolling_upgrade.py

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,7 @@
44

55
ROLLING_UPGRADES = (
66
# 4.0.0 -> 4.0.1 -> 4.0.2 don't support rolling upgrades due to a bug
7-
UpgradePath('4.0.2', '4.0.x'),
8-
UpgradePath('4.0.x', '4.1.0'),
9-
UpgradePath('4.1.0', '4.1.x'),
10-
UpgradePath('4.1.x', '4.2.x'),
11-
UpgradePath('4.2.x', '4.3.x'),
12-
UpgradePath('4.3.x', '4.4.x'),
13-
UpgradePath('4.4.x', '4.5.x'),
14-
UpgradePath('4.5.x', '4.6.x'),
15-
UpgradePath('4.6.x', '4.7.x'),
16-
UpgradePath('4.7.x', '4.8.x'),
17-
UpgradePath('4.8.x', '5.0.x'),
18-
UpgradePath('5.0.x', '5.1.x'),
19-
UpgradePath('5.1.x', '5.2.x'),
20-
UpgradePath('5.2.x', '5.3.x'),
21-
UpgradePath('5.3.x', '5.4.x'),
22-
UpgradePath('5.4.x', '5.5.x'),
23-
UpgradePath('5.5.x', '5.6.x'),
24-
UpgradePath('5.6.x', '5.7.x'),
257
UpgradePath('5.7.x', '5.8.x'),
26-
UpgradePath('5.8.x', '5.9.x'),
27-
UpgradePath('5.9.x', 'latest-nightly')
288
)
299

3010

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

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

194175
# Finally validate that all shards (primaries and replicas) of all partitions are started
195176
# and writes into the partitioned table while upgrading were successful
196177
with connect(cluster.node().http_url, error_trace=True) as conn:
197178
c = conn.cursor()
179+
180+
# Ensure that inserts, which will create a new partition, are working after upgrade
181+
c.execute("INSERT INTO doc.parted (id, value) VALUES (?, ?)", [10000, 10000])
182+
# Add the shards of the new partition primaries
183+
expected_active_shards += shards
184+
198185
wait_for_active_shards(c, expected_active_shards)
199186
c.execute('''
200187
REFRESH TABLE doc.parted

0 commit comments

Comments
 (0)