Skip to content

Commit

Permalink
Introduce mutation/ module
Browse files Browse the repository at this point in the history
Move mutation-related files to a new mutation/ directory. The names
are kept in the global namespace to reduce churn; the names are
unambiguous in any case.

mutation_reader remains in the readers/ module.

mutation_partition_v2.cc was missing from CMakeLists.txt; it's added in this
patch.

This is a step forward towards librarization or modularization of the
source base.

Closes scylladb#12788
  • Loading branch information
avikivity authored and denesb committed Feb 14, 2023
1 parent e2a20a1 commit c5e4bf5
Show file tree
Hide file tree
Showing 185 changed files with 242 additions and 241 deletions.
23 changes: 12 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ set(scylla_sources
api/system.cc
api/task_manager.cc
api/task_manager_test.cc
atomic_cell.cc
auth/allow_all_authenticator.cc
auth/allow_all_authorizer.cc
auth/authenticated_user.cc
Expand All @@ -317,7 +316,6 @@ set(scylla_sources
auth/transitional.cc
bytes.cc
caching_options.cc
canonical_mutation.cc
cdc/cdc_partitioner.cc
cdc/generation.cc
cdc/log.cc
Expand Down Expand Up @@ -467,7 +465,6 @@ set(scylla_sources
duration.cc
exceptions/exceptions.cc
readers/mutation_readers.cc
frozen_mutation.cc
frozen_schema.cc
generic_server.cc
gms/application_state.cc
Expand Down Expand Up @@ -507,11 +504,18 @@ set(scylla_sources
replica/memtable.cc
message/messaging_service.cc
multishard_mutation_query.cc
mutation.cc
mutation_fragment.cc
mutation_partition.cc
mutation_partition_serializer.cc
mutation_partition_view.cc
mutation/atomic_cell.cc
mutation/canonical_mutation.cc
mutation/frozen_mutation.cc
mutation/mutation.cc
mutation/mutation_fragment.cc
mutation/mutation_partition.cc
mutation/mutation_partition_serializer.cc
mutation/mutation_partition_v2.cc
mutation/mutation_partition_view.cc
mutation/partition_version.cc
mutation/range_tombstone.cc
mutation/range_tombstone_list.cc
mutation_query.cc
readers/mutation_reader.cc
mutation_writer/feed_writers.cc
Expand All @@ -520,7 +524,6 @@ set(scylla_sources
mutation_writer/shard_based_splitting_writer.cc
mutation_writer/timestamp_based_splitting_writer.cc
partition_slice_builder.cc
partition_version.cc
querier.cc
query.cc
query_ranges_to_vnodes.cc
Expand All @@ -531,8 +534,6 @@ set(scylla_sources
raft/server.cc
raft/tracker.cc
service/broadcast_tables/experimental/lang.cc
range_tombstone.cc
range_tombstone_list.cc
tombstone_gc_options.cc
tombstone_gc.cc
reader_concurrency_semaphore.cc
Expand Down
2 changes: 1 addition & 1 deletion alternator/serialization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "rapidjson/writer.h"
#include "concrete_types.hh"
#include "cql3/type_json.hh"
#include "position_in_partition.hh"
#include "mutation/position_in_partition.hh"

static logging::logger slogger("alternator-serialization");

Expand Down
2 changes: 1 addition & 1 deletion alternator/ttl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "service/pager/query_pagers.hh"
#include "gms/feature_service.hh"
#include "sstables/types.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"
#include "types.hh"
#include "types/map.hh"
#include "utils/rjson.hh"
Expand Down
2 changes: 1 addition & 1 deletion auth/service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "utils/class_registrator.hh"
#include "locator/abstract_replication_strategy.hh"
#include "data_dictionary/keyspace_metadata.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"

namespace auth {

Expand Down
4 changes: 2 additions & 2 deletions cache_flat_mutation_reader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

#include <vector>
#include "row_cache.hh"
#include "mutation_fragment.hh"
#include "mutation/mutation_fragment.hh"
#include "query-request.hh"
#include "partition_snapshot_row_cursor.hh"
#include "range_tombstone_assembler.hh"
#include "mutation/range_tombstone_assembler.hh"
#include "read_context.hh"
#include "readers/delegating_v2.hh"
#include "clustering_key_filter.hh"
Expand Down
2 changes: 1 addition & 1 deletion cdc/change_visitor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include "mutation.hh"
#include "mutation/mutation.hh"

/*
* This file contains a general abstraction for walking over mutations,
Expand Down
2 changes: 1 addition & 1 deletion cdc/split.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

#include "mutation.hh"
#include "mutation/mutation.hh"
#include "schema.hh"

#include "concrete_types.hh"
Expand Down
2 changes: 1 addition & 1 deletion cell_locking.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <boost/intrusive/unordered_set.hpp>

#include "utils/small_vector.hh"
#include "mutation_partition.hh"
#include "mutation/mutation_partition.hh"
#include "xx_hasher.hh"

#include "db/timeout_clock.hh"
Expand Down
2 changes: 1 addition & 1 deletion clustering_interval_set.hh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#pragma once

#include "schema_fwd.hh"
#include "position_in_partition.hh"
#include "mutation/position_in_partition.hh"
#include <boost/icl/interval_set.hpp>

// Represents a non-contiguous subset of clustering_key domain of a particular schema.
Expand Down
4 changes: 2 additions & 2 deletions clustering_ranges_walker.hh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include "schema.hh"
#include "query-request.hh"
#include "mutation_fragment.hh"
#include "mutation_fragment_v2.hh"
#include "mutation/mutation_fragment.hh"
#include "mutation/mutation_fragment_v2.hh"

// Utility for in-order checking of overlap with position ranges.
class clustering_ranges_walker {
Expand Down
2 changes: 1 addition & 1 deletion collection_mutation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "types/collection.hh"
#include "types/user.hh"
#include "concrete_types.hh"
#include "mutation_partition.hh"
#include "mutation/mutation_partition.hh"
#include "compaction/compaction_garbage_collector.hh"
#include "combine.hh"

Expand Down
2 changes: 1 addition & 1 deletion collection_mutation.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "utils/chunked_vector.hh"
#include "schema_fwd.hh"
#include "gc_clock.hh"
#include "atomic_cell.hh"
#include "mutation/atomic_cell.hh"
#include <iosfwd>
#include <forward_list>

Expand Down
6 changes: 3 additions & 3 deletions compaction/compaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
#include "db/system_keyspace.hh"
#include "service/priority_manager.hh"
#include "db_clock.hh"
#include "mutation_compactor.hh"
#include "mutation/mutation_compactor.hh"
#include "leveled_manifest.hh"
#include "dht/token.hh"
#include "dht/partition_filter.hh"
#include "mutation_writer/shard_based_splitting_writer.hh"
#include "mutation_writer/partition_based_splitting_writer.hh"
#include "mutation_source_metadata.hh"
#include "mutation_fragment_stream_validator.hh"
#include "mutation/mutation_source_metadata.hh"
#include "mutation/mutation_fragment_stream_validator.hh"
#include "utils/UUID_gen.hh"
#include "utils/utf8.hh"
#include "utils/fmt-compat.hh"
Expand Down
2 changes: 1 addition & 1 deletion compaction/time_window_compaction_strategy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "time_window_compaction_strategy.hh"
#include "leveled_manifest.hh"
#include "mutation_writer/timestamp_based_splitting_writer.hh"
#include "mutation_source_metadata.hh"
#include "mutation/mutation_source_metadata.hh"

#include <boost/range/algorithm/find.hpp>
#include <boost/range/algorithm/remove_if.hpp>
Expand Down
24 changes: 12 additions & 12 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,19 @@ def find_headers(repodir, excluded_dirs):
'replica/memtable.cc',
'replica/exceptions.cc',
'replica/dirty_memory_manager.cc',
'mutation/atomic_cell.cc',
'mutation/canonical_mutation.cc',
'mutation/frozen_mutation.cc',
'mutation/mutation.cc',
'mutation/mutation_fragment.cc',
'mutation/mutation_partition.cc',
'mutation/mutation_partition_v2.cc',
'mutation/mutation_partition_view.cc',
'mutation/mutation_partition_serializer.cc',
'mutation/partition_version.cc',
'mutation/range_tombstone.cc',
'mutation/range_tombstone_list.cc',
'absl-flat_hash_map.cc',
'atomic_cell.cc',
'caching_options.cc',
'collection_mutation.cc',
'client_data.cc',
Expand All @@ -672,12 +683,7 @@ def find_headers(repodir, excluded_dirs):
'schema_registry.cc',
'bytes.cc',
'timeout_config.cc',
'mutation.cc',
'mutation_fragment.cc',
'partition_version.cc',
'row_cache.cc',
'canonical_mutation.cc',
'frozen_mutation.cc',
'schema_mutations.cc',
'generic_server.cc',
'utils/array-search.cc',
Expand All @@ -692,10 +698,6 @@ def find_headers(repodir, excluded_dirs):
'utils/rjson.cc',
'utils/human_readable.cc',
'utils/histogram_metrics_helper.cc',
'mutation_partition.cc',
'mutation_partition_v2.cc',
'mutation_partition_view.cc',
'mutation_partition_serializer.cc',
'converting_mutation_partition_applier.cc',
'readers/combined.cc',
'readers/multishard.cc',
Expand Down Expand Up @@ -991,8 +993,6 @@ def find_headers(repodir, excluded_dirs):
'tracing/trace_state.cc',
'tracing/traced_file.cc',
'table_helper.cc',
'range_tombstone.cc',
'range_tombstone_list.cc',
'tombstone_gc_options.cc',
'tombstone_gc.cc',
'utils/disk-error-handler.cc',
Expand Down
4 changes: 2 additions & 2 deletions converting_mutation_partition_applier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "converting_mutation_partition_applier.hh"
#include "concrete_types.hh"

#include "mutation_partition_view.hh"
#include "mutation_partition.hh"
#include "mutation/mutation_partition_view.hh"
#include "mutation/mutation_partition.hh"
#include "schema.hh"

bool
Expand Down
4 changes: 2 additions & 2 deletions converting_mutation_partition_applier.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#pragma once

#include "mutation_partition_visitor.hh"
#include "atomic_cell.hh"
#include "mutation/mutation_partition_visitor.hh"
#include "mutation/atomic_cell.hh"
#include "schema.hh" // temporary: bring in definition of `column_kind`

class schema;
Expand Down
2 changes: 1 addition & 1 deletion counters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include "counters.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"
#include "combine.hh"

#include <boost/range/algorithm/sort.hpp>
Expand Down
2 changes: 1 addition & 1 deletion counters.hh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <boost/range/algorithm/find_if.hpp>
#include <boost/range/numeric.hpp>

#include "atomic_cell.hh"
#include "mutation/atomic_cell.hh"
#include "types.hh"
#include "locator/host_id.hh"

Expand Down
2 changes: 1 addition & 1 deletion cql3/constants.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "cql3/update_parameters.hh"
#include "cql3/operation.hh"
#include "cql3/values.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"
#include <seastar/core/shared_ptr.hh>

namespace service::broadcast_tables {
Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/alter_type_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "cql3/column_identifier.hh"
#include "prepared_statement.hh"
#include "schema_builder.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"
#include "service/migration_manager.hh"
#include "service/storage_proxy.hh"
#include "data_dictionary/data_dictionary.hh"
Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/cas_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
*/

#include "mutation.hh"
#include "mutation/mutation.hh"
#include "modification_statement.hh"
#include "cas_request.hh"
#include <seastar/core/sleep.hh>
Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/create_aggregate_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "service/migration_manager.hh"
#include "service/storage_proxy.hh"
#include "data_dictionary/data_dictionary.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"
#include "cql3/query_processor.hh"
#include "gms/feature_service.hh"

Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/create_index_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "cql3/index_name.hh"
#include "cql3/statements/index_prop_defs.hh"
#include "index/secondary_index_manager.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"

#include <boost/range/adaptor/transformed.hpp>
#include <boost/algorithm/string/join.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/create_keyspace_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "prepared_statement.hh"
#include "data_dictionary/data_dictionary.hh"
#include "data_dictionary/keyspace_metadata.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"
#include "service/migration_manager.hh"
#include "service/storage_proxy.hh"
#include "transport/messages/result_message.hh"
Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/create_type_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "data_dictionary/user_types_metadata.hh"
#include "cql3/query_processor.hh"
#include "cql3/column_identifier.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"

namespace cql3 {

Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/delete_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "delete_statement.hh"
#include "raw/delete_statement.hh"
#include "utils/overloaded_functor.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"
#include "cql3/expr/expression.hh"

namespace cql3 {
Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/drop_aggregate_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "prepared_statement.hh"
#include "service/migration_manager.hh"
#include "cql3/query_processor.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"

namespace cql3 {

Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/drop_function_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "prepared_statement.hh"
#include "service/migration_manager.hh"
#include "cql3/query_processor.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"

namespace cql3 {

Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/drop_index_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "service/storage_proxy.hh"
#include "schema_builder.hh"
#include "data_dictionary/data_dictionary.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"
#include "gms/feature_service.hh"
#include "cql3/query_processor.hh"
#include "cql3/index_name.hh"
Expand Down
2 changes: 1 addition & 1 deletion cql3/statements/drop_keyspace_statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "service/migration_manager.hh"
#include "service/storage_proxy.hh"
#include "transport/event.hh"
#include "mutation.hh"
#include "mutation/mutation.hh"

namespace cql3 {

Expand Down
Loading

0 comments on commit c5e4bf5

Please sign in to comment.