schema: Make "describe" use extensions to string

Fixes #19334

Current impl uses hardcoded printing of a few extensions.
Instead, use extension options to string and print all.
This commit is contained in:
Calle Wilund
2024-06-17 13:28:42 +00:00
parent d27620e146
commit 73abc56d79

View File

@@ -993,15 +993,9 @@ std::ostream& schema::schema_properties(replica::database& db, std::ostream& os)
os << "\n AND memtable_flush_period_in_ms = " << memtable_flush_period();
os << "\n AND min_index_interval = " << min_index_interval();
os << "\n AND speculative_retry = '" << speculative_retry().to_sstring() << "'";
os << "\n AND paxos_grace_seconds = " << paxos_grace_seconds().count();
os << "\n AND tombstone_gc = {";
map_as_cql_param(os, tombstone_gc_options().to_map());
os << "}";
if (cdc_options().enabled()) {
os << "\n AND cdc = {";
map_as_cql_param(os, cdc_options().to_map());
os << "}";
for (auto& [type, ext] : extensions()) {
os << "\n AND " << type << " = " << ext->options_to_string();
}
if (is_view() && !is_index(db, view_info()->base_id(), *this)) {
auto is_sync_update = db::find_tag(*this, db::SYNCHRONOUS_VIEW_UPDATES_TAG_KEY);