mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 04:06:59 +00:00
Compare commits
2 Commits
migrate-wi
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93fbc0a683 | ||
|
|
520466b407 |
@@ -71,7 +71,7 @@ used. If it is used, the statement will be a no-op if the materialized view alre
|
||||
MV Select Statement
|
||||
...................
|
||||
|
||||
The select statement of a materialized view creation defines which of the base table is included in the view. That
|
||||
The select statement of a materialized view creation defines which of the base table columns are included in the view. That
|
||||
statement is limited in a number of ways:
|
||||
|
||||
- The :ref:`selection <selection-clause>` is limited to those that only select columns of the base table. In other
|
||||
|
||||
@@ -227,11 +227,6 @@ 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,7 +111,6 @@ 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
|
||||
@@ -466,9 +465,6 @@ 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:
|
||||
@@ -651,12 +647,11 @@ class ScyllaNode:
|
||||
cmd.append(table)
|
||||
self.nodetool(" ".join(cmd), **kwargs)
|
||||
|
||||
def compact(self, keyspace: str = "", tables: list[str] | None = None) -> None:
|
||||
def compact(self, keyspace: str = "", tables: str | None = ()) -> None:
|
||||
compact_cmd = ["compact"]
|
||||
if keyspace:
|
||||
compact_cmd.append(keyspace)
|
||||
if tables:
|
||||
compact_cmd.extend(tables)
|
||||
compact_cmd += tables
|
||||
self.nodetool(" ".join(compact_cmd))
|
||||
|
||||
def drain(self, block_on_log: bool = False) -> None:
|
||||
@@ -829,13 +824,10 @@ 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
|
||||
|
||||
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
|
||||
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}")
|
||||
|
||||
def rmtree(self, path: str | Path) -> None:
|
||||
"""Delete a directory content without removing the directory.
|
||||
|
||||
@@ -263,25 +263,3 @@ 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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user