mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 04:06:59 +00:00
Compare commits
10 Commits
branch-202
...
migrate-wi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d320a45a2c | ||
|
|
6d560c76ff | ||
|
|
76799e8a32 | ||
|
|
fb09604158 | ||
|
|
c386c8bb27 | ||
|
|
f4059c2ee9 | ||
|
|
49135b0f9d | ||
|
|
14ac36cd74 | ||
|
|
bf65abde14 | ||
|
|
86472e43e1 |
@@ -78,7 +78,7 @@ fi
|
||||
|
||||
# Default scylla product/version tags
|
||||
PRODUCT=scylla
|
||||
VERSION=2026.2.0-rc0
|
||||
VERSION=2026.3.0-dev
|
||||
|
||||
if test -f version
|
||||
then
|
||||
|
||||
@@ -227,6 +227,11 @@ class ScyllaCluster:
|
||||
def flush(self) -> None:
|
||||
self.nodetool("flush")
|
||||
|
||||
def compact(self, keyspace: str = "", tables: list[str] | None = None) -> None:
|
||||
for node in self.nodelist():
|
||||
if node.is_running():
|
||||
node.compact(keyspace=keyspace, tables=tables)
|
||||
|
||||
@staticmethod
|
||||
def debug(message: str) -> None:
|
||||
logger.debug(message)
|
||||
|
||||
@@ -111,6 +111,7 @@ class ScyllaNode:
|
||||
self.data_center = server.datacenter
|
||||
self.rack = server.rack
|
||||
|
||||
self._hostid = None
|
||||
self._smp_set_during_test = None
|
||||
self._smp = None
|
||||
self._memory = None
|
||||
@@ -465,6 +466,9 @@ class ScyllaNode:
|
||||
if wait_for_binary_proto:
|
||||
self.wait_for_binary_interface(from_mark=self.mark)
|
||||
|
||||
if not self._hostid:
|
||||
self.hostid()
|
||||
|
||||
if wait_other_notice:
|
||||
timeout = self.cluster.default_wait_other_notice_timeout
|
||||
for node, mark in marks:
|
||||
@@ -647,11 +651,12 @@ class ScyllaNode:
|
||||
cmd.append(table)
|
||||
self.nodetool(" ".join(cmd), **kwargs)
|
||||
|
||||
def compact(self, keyspace: str = "", tables: str | None = ()) -> None:
|
||||
def compact(self, keyspace: str = "", tables: list[str] | None = None) -> None:
|
||||
compact_cmd = ["compact"]
|
||||
if keyspace:
|
||||
compact_cmd.append(keyspace)
|
||||
compact_cmd += tables
|
||||
if tables:
|
||||
compact_cmd.extend(tables)
|
||||
self.nodetool(" ".join(compact_cmd))
|
||||
|
||||
def drain(self, block_on_log: bool = False) -> None:
|
||||
@@ -824,10 +829,13 @@ class ScyllaNode:
|
||||
assert timeout is None, "argument `timeout` is not supported" # not used in scylla-dtest
|
||||
assert force_refresh is None, "argument `force_refresh` is not supported" # not used in scylla-dtest
|
||||
|
||||
try:
|
||||
return self.cluster.manager.get_host_id(server_id=self.server_id)
|
||||
except Exception as exc:
|
||||
self.error(f"Failed to get hostid: {exc}")
|
||||
if not self._hostid:
|
||||
try:
|
||||
self._hostid = self.cluster.manager.get_host_id(server_id=self.server_id)
|
||||
except Exception as exc:
|
||||
self.error(f"Failed to get hostid: {exc}")
|
||||
|
||||
return self._hostid
|
||||
|
||||
def rmtree(self, path: str | Path) -> None:
|
||||
"""Delete a directory content without removing the directory.
|
||||
|
||||
@@ -263,3 +263,25 @@ def assert_lists_equal_ignoring_order(list1, list2, sort_key=None):
|
||||
sorted_list2 = sorted(normalized_list2, key=lambda elm: str(elm[sort_key]))
|
||||
|
||||
assert sorted_list1 == sorted_list2
|
||||
|
||||
|
||||
def assert_equal_more_with_deviation(actual, expect, deviation_perc):
|
||||
"""
|
||||
Assert actual is within inclusive interval [expected...expected+deviation_perc]
|
||||
@param actual Value inspected
|
||||
@param expect Beginning of expected interval
|
||||
@param deviation_perc allowed percent increase
|
||||
"""
|
||||
deviation_high = (expect * (100 + deviation_perc)) / 100
|
||||
assert expect <= actual <= deviation_high, f"Expect result interval {expect}..{deviation_high}, received {actual}"
|
||||
|
||||
|
||||
def assert_less_equal_lists(actual_list, expected_list, msg=None):
|
||||
"""
|
||||
Assert actual_list is a subset of the expected list, prints hardcoded or parameterized error message
|
||||
@param actual_list Inspected list
|
||||
@param expected_list List that supposed to include actual_list
|
||||
@param msg Configured message default None.
|
||||
"""
|
||||
standardMsg = msg or f"{actual_list} not less than or equal to {expected_list}"
|
||||
assert set(actual_list) <= set(expected_list), standardMsg
|
||||
|
||||
1436
test/cluster/dtest/wide_rows_test.py
Normal file
1436
test/cluster/dtest/wide_rows_test.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user