mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
Merge 'Rename 'system.status' and 'system.describe_ring' virtual tables' from Avi Kivity
'system.status' and 'system.describe_ring' are imperfect names for what they do, so rename them. Fortunately they aren't exposed in any released version so there is no compatibility concern. Closes #9530 * github.com:scylladb/scylla: system_keyspace: rename 'system.describe_ring' to 'system.token_ring' system_keyspace: rename 'system.status' to 'system.cluster_status'
This commit is contained in:
@@ -1795,17 +1795,17 @@ future<> system_keyspace::set_bootstrap_state(bootstrap_state state) {
|
||||
});
|
||||
}
|
||||
|
||||
class nodetool_status_table : public memtable_filling_virtual_table {
|
||||
class cluster_status_table : public memtable_filling_virtual_table {
|
||||
private:
|
||||
service::storage_service& _ss;
|
||||
public:
|
||||
nodetool_status_table(service::storage_service& ss)
|
||||
cluster_status_table(service::storage_service& ss)
|
||||
: memtable_filling_virtual_table(build_schema())
|
||||
, _ss(ss) {}
|
||||
|
||||
static schema_ptr build_schema() {
|
||||
auto id = generate_legacy_id(system_keyspace::NAME, "status");
|
||||
return schema_builder(system_keyspace::NAME, "status", std::make_optional(id))
|
||||
auto id = generate_legacy_id(system_keyspace::NAME, "cluster_status");
|
||||
return schema_builder(system_keyspace::NAME, "cluster_status", std::make_optional(id))
|
||||
.with_column("peer", inet_addr_type, column_kind::partition_key)
|
||||
.with_column("dc", utf8_type)
|
||||
.with_column("up", boolean_type)
|
||||
@@ -1855,11 +1855,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class describe_ring_table : public streaming_virtual_table {
|
||||
class token_ring_table : public streaming_virtual_table {
|
||||
private:
|
||||
service::storage_service& _ss;
|
||||
public:
|
||||
describe_ring_table(service::storage_service& ss)
|
||||
token_ring_table(service::storage_service& ss)
|
||||
: streaming_virtual_table(build_schema())
|
||||
, _ss(ss)
|
||||
{
|
||||
@@ -1867,8 +1867,8 @@ public:
|
||||
}
|
||||
|
||||
static schema_ptr build_schema() {
|
||||
auto id = generate_legacy_id(system_keyspace::NAME, "describe_ring");
|
||||
return schema_builder(system_keyspace::NAME, "describe_ring", std::make_optional(id))
|
||||
auto id = generate_legacy_id(system_keyspace::NAME, "token_ring");
|
||||
return schema_builder(system_keyspace::NAME, "token_ring", std::make_optional(id))
|
||||
.with_column("keyspace_name", utf8_type, column_kind::partition_key)
|
||||
.with_column("start_token", utf8_type, column_kind::clustering_key)
|
||||
.with_column("endpoint", inet_addr_type, column_kind::clustering_key)
|
||||
@@ -1953,8 +1953,8 @@ void register_virtual_tables(service::storage_service& ss) {
|
||||
};
|
||||
|
||||
// Add built-in virtual tables here.
|
||||
add_table(std::make_unique<nodetool_status_table>(ss));
|
||||
add_table(std::make_unique<describe_ring_table>(ss));
|
||||
add_table(std::make_unique<cluster_status_table>(ss));
|
||||
add_table(std::make_unique<token_ring_table>(ss));
|
||||
}
|
||||
|
||||
std::vector<schema_ptr> system_keyspace::all_tables(const db::config& cfg) {
|
||||
|
||||
Reference in New Issue
Block a user