mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 19:21:01 +00:00
" Currently the sstable reader code is scattered across several source files as following (paths are relative to sstables/): * partition.cc - generic reader code; * row.hh - format specific code related to building mutation fragments from cells; * mp_row_consumer.hh - format specific code related to parsing the raw byte stream; This is a strange organization scheme given that the generic sstable reader is a template and as such it doesn't itself depend on the other headers where the consumer and context implementations live. Yet these are all included in partition.cc just so the reader factory function can instantiate the sstable reader template with the format specific objects. This patchset reorganizes this code such that the generic sstable reader is exposed in a header. Furthermore, format specific code is moved to the kl/ and mx/ directories respectively. Each directory has a reader.hh with a single factory function which creates the reader, all the format specific code is hidden from sight. The added benefit is that now reader code specific to a format is centralized in the format specific folder, just like the writer code. This patchset only moves code around, no logical changes are made. Tests: unit(dev) " * 'sstable-reader-separation/v1' of https://github.com/denesb/scylla: sstables: get rid of mp_row_consumer.{hh,cc} sstables: get rid of row.hh sstables/mp_row_consumer.hh: remove unused struct new_mutation sstables: move mx specific context and consumer to mx/reader.cc sstables: move kl specific context and consumer to kl/reader.cc sstables: mv partition.cc sstable_mutation_reader.hh