mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-24 00:32:15 +00:00
When finalizing a tablet split, all data must have been moved into split-ready compaction groups before the storage groups can be remapped to the new tablet count. If split-unready groups still hold data at that point, handle_tablet_split_completion() calls on_internal_error(), which previously only reported the tablet and table IDs — giving no insight into why the split-unready groups were not empty. Add fmt::formatter specializations for compaction_group and storage_group so the full state of the offending storage_group is included in the error message. The storage_group formatter emits: main=<cg>, merging=[<cg>...], split_ready=[<cg>...] Each compaction_group formatter emits: [sstables=[<sstable_desc>...], memtable_empty=<bool>, sstable_add_gate=<count>] where sstable_desc includes filename, origin, identifier and originating host, memtable_empty reflects whether all memtables have been flushed, and sstable_add_gate count reveals whether an in-flight sstable add is holding data in the group. Supporting changes: - compaction_group: add memtable_empty() const noexcept (delegates to memtable_list::empty()) and a const overload of sstable_add_gate() so both are accessible from a const compaction_group reference inside the formatter. - Promote sstable_desc from a local lambda in compaction_group_for_sstable to a static free function so it is reusable by the formatter. Refs https://scylladb.atlassian.net/browse/SCYLLADB-1019. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Closes scylladb/scylladb#29178