Compare commits
10 Commits
SCYLLADB-6
...
copilot/su
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae0208e35c | ||
|
|
b418e7a489 | ||
|
|
2c5727753a | ||
|
|
051107f5bc | ||
|
|
c8e7e20c5c | ||
|
|
fb1f995d6b | ||
|
|
32225797cd | ||
|
|
f29525f3a6 | ||
|
|
05b11a3b82 | ||
|
|
f511264831 |
@@ -8,6 +8,9 @@ on:
|
||||
jobs:
|
||||
check-fixes-prefix:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
steps:
|
||||
- name: Check PR body for "Fixes" prefix patterns
|
||||
uses: actions/github-script@v7
|
||||
|
||||
2
.github/workflows/trigger-scylla-ci.yaml
vendored
2
.github/workflows/trigger-scylla-ci.yaml
vendored
@@ -1,5 +1,7 @@
|
||||
name: Trigger Scylla CI Route
|
||||
|
||||
permissions: {}
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
@@ -952,6 +952,8 @@ class sstring:
|
||||
|
||||
@staticmethod
|
||||
def to_hex(data, size):
|
||||
if size == 0:
|
||||
return ''
|
||||
inf = gdb.selected_inferior()
|
||||
return bytes(inf.read_memory(data, size)).hex()
|
||||
|
||||
@@ -974,6 +976,8 @@ class sstring:
|
||||
return self.ref['u']['external']['str']
|
||||
|
||||
def as_bytes(self):
|
||||
if len(self) == 0:
|
||||
return b''
|
||||
inf = gdb.selected_inferior()
|
||||
return bytes(inf.read_memory(self.data(), len(self)))
|
||||
|
||||
@@ -5636,6 +5640,8 @@ class scylla_sstable_summary(gdb.Command):
|
||||
self.inf = gdb.selected_inferior()
|
||||
|
||||
def to_hex(self, data, size):
|
||||
if size == 0:
|
||||
return ''
|
||||
return bytes(self.inf.read_memory(data, size)).hex()
|
||||
|
||||
def invoke(self, arg, for_tty):
|
||||
@@ -5647,6 +5653,10 @@ class scylla_sstable_summary(gdb.Command):
|
||||
sst = seastar_lw_shared_ptr(arg).get().dereference()
|
||||
else:
|
||||
sst = arg
|
||||
ms_version = int(gdb.parse_and_eval('sstables::sstable_version_types::ms'))
|
||||
if int(sst['_version']) >= ms_version:
|
||||
gdb.write("sstable uses ms format (trie-based index); summary is not populated.\n")
|
||||
return
|
||||
summary = seastar_lw_shared_ptr(sst['_components']['_value']).get().dereference()['summary']
|
||||
|
||||
gdb.write("header: {}\n".format(summary['header']))
|
||||
|
||||
@@ -221,10 +221,16 @@ private:
|
||||
sst->set_sstable_level(0);
|
||||
auto units = co_await sst_manager.dir_semaphore().get_units(1);
|
||||
sstables::sstable_open_config cfg {
|
||||
.unsealed_sstable = true,
|
||||
.ignore_component_digest_mismatch = db.get_config().ignore_component_digest_mismatch(),
|
||||
};
|
||||
co_await sst->load(table.get_effective_replication_map()->get_sharder(*table.schema()), cfg);
|
||||
co_await table.add_sstable_and_update_cache(sst);
|
||||
co_await table.add_new_sstable_and_update_cache(sst, [&sst_manager, sst] (sstables::shared_sstable loading_sst) -> future<> {
|
||||
if (loading_sst == sst) {
|
||||
auto writer_cfg = sst_manager.configure_writer(loading_sst->get_origin());
|
||||
co_await loading_sst->seal_sstable(writer_cfg.backup);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
future<>
|
||||
@@ -295,7 +301,8 @@ private:
|
||||
sstables::sstable_state::normal,
|
||||
sstables::sstable::component_basename(
|
||||
_table.schema()->ks_name(), _table.schema()->cf_name(), descriptor.version, gen, descriptor.format, it->first),
|
||||
sstables::sstable_stream_sink_cfg{.last_component = std::next(it) == components.cend()});
|
||||
sstables::sstable_stream_sink_cfg{.last_component = std::next(it) == components.cend(),
|
||||
.leave_unsealed = true});
|
||||
auto out = co_await sstable_sink->output(foptions, stream_options);
|
||||
|
||||
input_stream src(co_await [this, &it, sstable, f = files.at(it->first)]() -> future<input_stream<char>> {
|
||||
|
||||
@@ -62,7 +62,11 @@ SEASTAR_TEST_CASE(test_index_doesnt_flood_cache_in_small_partition_workload) {
|
||||
// cfg.db_config->index_cache_fraction.set(1.0);
|
||||
return do_with_cql_env_thread([] (cql_test_env& e) {
|
||||
// We disable compactions because they cause confusing cache mispopulations.
|
||||
e.execute_cql("CREATE TABLE ks.t(pk blob PRIMARY KEY) WITH compaction = { 'class' : 'NullCompactionStrategy' };").get();
|
||||
// We disable compression because the sstable writer targets a specific
|
||||
// (*compressed* data file size : summary file size) ratio,
|
||||
// so the number of keys per index page becomes hard to control,
|
||||
// and might be arbitrarily large.
|
||||
e.execute_cql("CREATE TABLE ks.t(pk blob PRIMARY KEY) WITH compaction = { 'class' : 'NullCompactionStrategy' } AND compression = {'sstable_compression': ''};").get();
|
||||
auto insert_query = e.prepare("INSERT INTO ks.t(pk) VALUES (?)").get();
|
||||
auto select_query = e.prepare("SELECT * FROM t WHERE pk = ?").get();
|
||||
|
||||
@@ -154,7 +158,11 @@ SEASTAR_TEST_CASE(test_index_is_cached_in_big_partition_workload) {
|
||||
// cfg.db_config->index_cache_fraction.set(0.0);
|
||||
return do_with_cql_env_thread([] (cql_test_env& e) {
|
||||
// We disable compactions because they cause confusing cache mispopulations.
|
||||
e.execute_cql("CREATE TABLE ks.t(pk bigint, ck bigint, v blob, primary key (pk, ck)) WITH compaction = { 'class' : 'NullCompactionStrategy' };").get();
|
||||
// We disable compression because the sstable writer targets a specific
|
||||
// (*compressed* data file size : summary file size) ratio,
|
||||
// so the number of keys per index page becomes hard to control,
|
||||
// and might be arbitrarily large.
|
||||
e.execute_cql("CREATE TABLE ks.t(pk bigint, ck bigint, v blob, primary key (pk, ck)) WITH compaction = { 'class' : 'NullCompactionStrategy' } AND compression = {'sstable_compression': ''};").get();
|
||||
auto insert_query = e.prepare("INSERT INTO ks.t(pk, ck, v) VALUES (?, ?, ?)").get();
|
||||
auto select_query = e.prepare("SELECT * FROM t WHERE pk = ? AND ck = ?").get();
|
||||
|
||||
|
||||
@@ -691,7 +691,7 @@ class TesterAlternator(BaseAlternator):
|
||||
random.choice(nodes_for_maintenance).compact()
|
||||
except NodetoolError as exc:
|
||||
error_message = str(exc)
|
||||
valid_errors = ["ConnectException", "status code 404 Not Found"]
|
||||
valid_errors = ["ConnectException", "Connection refused", "status code 404 Not Found"]
|
||||
if not any(err in error_message for err in valid_errors):
|
||||
raise
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ class TestSchemaManagement(Tester):
|
||||
|
||||
logger.debug("Restarting node2")
|
||||
node2.start(wait_for_binary_proto=True)
|
||||
session2 = self.patient_cql_connection(node2)
|
||||
session2 = self.patient_exclusive_cql_connection(node2)
|
||||
read_barrier(session2)
|
||||
|
||||
rows = session.execute(SimpleStatement("SELECT * FROM cf", consistency_level=ConsistencyLevel.ALL))
|
||||
@@ -382,7 +382,7 @@ class TestSchemaManagement(Tester):
|
||||
|
||||
logger.debug("Restarting node2")
|
||||
node2.start(wait_for_binary_proto=True)
|
||||
session2 = self.patient_cql_connection(node2)
|
||||
session2 = self.patient_exclusive_cql_connection(node2)
|
||||
read_barrier(session2)
|
||||
|
||||
session.execute(SimpleStatement("INSERT INTO cf (p, v) VALUES (2, '2')", consistency_level=ConsistencyLevel.ALL))
|
||||
|
||||
@@ -808,7 +808,16 @@ async def test_index_requires_rf_rack_valid_keyspace(manager: ManagerClient):
|
||||
|
||||
# Create a table with tablets and no indexes, then add a GSI - the update should fail
|
||||
table_name = unique_table_name()
|
||||
create_table_with_index(alternator, table_name, index_type=None, initial_tablets='1')
|
||||
# The server waits 10s for schema agreement after creating a table,
|
||||
# which may not be enough after a sequence of rapid schema changes
|
||||
# on a multi-node cluster (see SCYLLADB-1135). Retry if needed.
|
||||
for attempt in range(2):
|
||||
try:
|
||||
create_table_with_index(alternator, table_name, index_type=None, initial_tablets='1')
|
||||
break
|
||||
except ClientError as e:
|
||||
if 'schema agreement' not in str(e) or attempt == 1:
|
||||
raise
|
||||
with pytest.raises(ClientError, match=expected_err_update_add_gsi):
|
||||
alternator.meta.client.update_table(
|
||||
TableName=table_name,
|
||||
|
||||
Reference in New Issue
Block a user