diff --git a/CMakeLists.txt b/CMakeLists.txt index 5eded4631d..1511bcae8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,7 +221,6 @@ set(scylla_sources gms/inet_address.cc gms/versioned_value.cc gms/version_generator.cc - hashers.cc index/secondary_index.cc index/secondary_index_manager.cc init.cc @@ -398,6 +397,7 @@ set(scylla_sources utils/generation-number.cc utils/gz/crc_combine.cc utils/gz/crc_combine_table.cc + utils/hashers.cc utils/human_readable.cc utils/i_filter.cc utils/large_bitset.cc diff --git a/alternator/auth.cc b/alternator/auth.cc index cb460c98fc..41b583cf64 100644 --- a/alternator/auth.cc +++ b/alternator/auth.cc @@ -11,7 +11,7 @@ #include #include #include -#include "hashers.hh" +#include "utils/hashers.hh" #include "bytes.hh" #include "alternator/auth.hh" #include diff --git a/bytes.hh b/bytes.hh index 001f25f47d..68ec5fbff4 100644 --- a/bytes.hh +++ b/bytes.hh @@ -10,7 +10,7 @@ #include "seastarx.hh" #include -#include "hashing.hh" +#include "utils/hashing.hh" #include #include #include diff --git a/bytes_ostream.hh b/bytes_ostream.hh index 41e980c8c7..01253c2371 100644 --- a/bytes_ostream.hh +++ b/bytes_ostream.hh @@ -12,7 +12,7 @@ #include "bytes.hh" #include "utils/managed_bytes.hh" -#include "hashing.hh" +#include "utils/hashing.hh" #include #include #include diff --git a/cell_locking.hh b/cell_locking.hh index b634f6c346..90dd2c020a 100644 --- a/cell_locking.hh +++ b/cell_locking.hh @@ -12,7 +12,7 @@ #include "utils/small_vector.hh" #include "mutation/mutation_partition.hh" -#include "xx_hasher.hh" +#include "utils/xx_hasher.hh" #include "db/timeout_clock.hh" diff --git a/configure.py b/configure.py index 4fc1e70970..459f75f5fd 100755 --- a/configure.py +++ b/configure.py @@ -676,7 +676,6 @@ scylla_core = (['message/messaging_service.cc', 'collection_mutation.cc', 'client_data.cc', 'debug.cc', - 'hashers.cc', 'schema/caching_options.cc', 'schema/schema.cc', 'schema/schema_registry.cc', @@ -995,6 +994,7 @@ scylla_core = (['message/messaging_service.cc', 'tombstone_gc_options.cc', 'tombstone_gc.cc', 'utils/disk-error-handler.cc', + 'utils/hashers.cc', 'duration.cc', 'vint-serialization.cc', 'utils/arch/powerpc/crc32-vpmsum/crc32_wrapper.cc', @@ -1281,7 +1281,7 @@ deps['test/boost/bytes_ostream_test'] = [ "test/lib/log.cc", ] deps['test/boost/input_stream_test'] = ['test/boost/input_stream_test.cc'] -deps['test/boost/UUID_test'] = ['utils/UUID_gen.cc', 'test/boost/UUID_test.cc', 'utils/uuid.cc', 'utils/dynamic_bitset.cc', 'hashers.cc'] +deps['test/boost/UUID_test'] = ['utils/UUID_gen.cc', 'test/boost/UUID_test.cc', 'utils/uuid.cc', 'utils/dynamic_bitset.cc', 'utils/hashers.cc'] deps['test/boost/murmur_hash_test'] = ['bytes.cc', 'utils/murmur_hash.cc', 'test/boost/murmur_hash_test.cc'] deps['test/boost/allocation_strategy_test'] = ['test/boost/allocation_strategy_test.cc', 'utils/logalloc.cc', 'utils/dynamic_bitset.cc'] deps['test/boost/log_heap_test'] = ['test/boost/log_heap_test.cc'] diff --git a/cql3/query_processor.cc b/cql3/query_processor.cc index 58c42add60..75018a69c5 100644 --- a/cql3/query_processor.cc +++ b/cql3/query_processor.cc @@ -21,7 +21,7 @@ #include "cql3/untyped_result_set.hh" #include "db/config.hh" #include "data_dictionary/data_dictionary.hh" -#include "hashers.hh" +#include "utils/hashers.hh" #include "utils/error_injection.hh" namespace cql3 { diff --git a/db/schema_tables.cc b/db/schema_tables.cc index 64d2b43bef..b7be4a5883 100644 --- a/db/schema_tables.cc +++ b/db/schema_tables.cc @@ -39,7 +39,7 @@ #include "db/marshal/type_parser.hh" #include "db/config.hh" #include "db/extensions.hh" -#include "hashers.hh" +#include "utils/hashers.hh" #include #include diff --git a/db/schema_tables.hh b/db/schema_tables.hh index eb2a2b9681..15132405fa 100644 --- a/db/schema_tables.hh +++ b/db/schema_tables.hh @@ -13,7 +13,7 @@ #include "db/commitlog/replay_position.hh" #include "schema/schema_fwd.hh" #include "schema_features.hh" -#include "hashing.hh" +#include "utils/hashing.hh" #include "schema_mutations.hh" #include "types/map.hh" #include "query-result-set.hh" diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index f402b49af9..323d077177 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -37,7 +37,7 @@ #include "gms/feature_service.hh" #include "system_keyspace_view_types.hh" #include "schema/schema_builder.hh" -#include "hashers.hh" +#include "utils/hashers.hh" #include "release.hh" #include "log.hh" #include diff --git a/gc_clock.hh b/gc_clock.hh index 6de449aa42..1605c27e76 100644 --- a/gc_clock.hh +++ b/gc_clock.hh @@ -9,7 +9,7 @@ #pragma once #include "clocks-impl.hh" -#include "hashing.hh" +#include "utils/hashing.hh" #include diff --git a/hashing_partition_visitor.hh b/hashing_partition_visitor.hh index d6c9324d71..c998b0b101 100644 --- a/hashing_partition_visitor.hh +++ b/hashing_partition_visitor.hh @@ -9,7 +9,7 @@ #pragma once #include "mutation/mutation_partition_visitor.hh" -#include "hashing.hh" +#include "utils/hashing.hh" #include "schema/schema.hh" #include "mutation/atomic_cell_hash.hh" #include "keys.hh" diff --git a/keys.hh b/keys.hh index e93a5b1e28..32e837d635 100644 --- a/keys.hh +++ b/keys.hh @@ -12,7 +12,7 @@ #include "types.hh" #include "compound_compat.hh" #include "utils/managed_bytes.hh" -#include "hashing.hh" +#include "utils/hashing.hh" #include "replica/database_fwd.hh" #include "schema/schema_fwd.hh" #include diff --git a/message/messaging_service.cc b/message/messaging_service.cc index 9407f24c61..45569c7abe 100644 --- a/message/messaging_service.cc +++ b/message/messaging_service.cc @@ -29,13 +29,13 @@ #include "range.hh" #include "frozen_schema.hh" #include "repair/repair.hh" -#include "digest_algorithm.hh" +#include "utils/digest_algorithm.hh" #include "service/paxos/proposal.hh" #include "service/paxos/prepare_response.hh" #include "query-request.hh" #include "mutation_query.hh" #include "repair/repair.hh" -#include "digest_algorithm.hh" +#include "utils/digest_algorithm.hh" #include "streaming/stream_reason.hh" #include "streaming/stream_mutation_fragments_cmd.hh" #include "cache_temperature.hh" diff --git a/mutation/atomic_cell_hash.hh b/mutation/atomic_cell_hash.hh index e400613fa0..0582bb7fcd 100644 --- a/mutation/atomic_cell_hash.hh +++ b/mutation/atomic_cell_hash.hh @@ -14,7 +14,7 @@ #include "types/collection.hh" #include "atomic_cell.hh" #include "atomic_cell_or_collection.hh" -#include "hashing.hh" +#include "utils/hashing.hh" #include "counters.hh" template<> diff --git a/mutation/mutation.hh b/mutation/mutation.hh index de9eabc016..109ea5cd5b 100644 --- a/mutation/mutation.hh +++ b/mutation/mutation.hh @@ -14,7 +14,7 @@ #include "keys.hh" #include "schema/schema_fwd.hh" #include "dht/i_partitioner.hh" -#include "hashing.hh" +#include "utils/hashing.hh" #include "mutation_fragment_v2.hh" #include "mutation_consumer.hh" #include "range_tombstone_change_generator.hh" diff --git a/mutation/mutation_fragment.cc b/mutation/mutation_fragment.cc index 3cbab847e3..74fe6b805f 100644 --- a/mutation/mutation_fragment.cc +++ b/mutation/mutation_fragment.cc @@ -13,8 +13,8 @@ #include "mutation_fragment.hh" #include "mutation_fragment_v2.hh" #include "clustering_interval_set.hh" -#include "hashing.hh" -#include "xx_hasher.hh" +#include "utils/hashing.hh" +#include "utils/xx_hasher.hh" std::ostream& operator<<(std::ostream& os, const clustering_row::printer& p) { diff --git a/mutation/range_tombstone.hh b/mutation/range_tombstone.hh index d075c42d15..1041ecdeab 100644 --- a/mutation/range_tombstone.hh +++ b/mutation/range_tombstone.hh @@ -10,7 +10,7 @@ #include #include -#include "hashing.hh" +#include "utils/hashing.hh" #include "keys.hh" #include "mutation/tombstone.hh" #include "clustering_bounds_comparator.hh" diff --git a/mutation/tombstone.hh b/mutation/tombstone.hh index b8276a5246..8560234a6f 100644 --- a/mutation/tombstone.hh +++ b/mutation/tombstone.hh @@ -13,7 +13,7 @@ #include "timestamp.hh" #include "gc_clock.hh" -#include "hashing.hh" +#include "utils/hashing.hh" /** * Represents deletion operation. Can be commuted with other tombstones via apply() method. diff --git a/query-result-reader.hh b/query-result-reader.hh index 9c7f6e614c..82cb244940 100644 --- a/query-result-reader.hh +++ b/query-result-reader.hh @@ -12,7 +12,7 @@ #include #include "query-result.hh" -#include "digest_algorithm.hh" +#include "utils/digest_algorithm.hh" #include "full_position.hh" #include "idl/query.dist.hh" diff --git a/query-result-writer.hh b/query-result-writer.hh index ea9344e354..5947071819 100644 --- a/query-result-writer.hh +++ b/query-result-writer.hh @@ -12,8 +12,8 @@ #include "mutation/atomic_cell.hh" #include "query-request.hh" #include "query-result.hh" -#include "digest_algorithm.hh" -#include "digester.hh" +#include "utils/digest_algorithm.hh" +#include "utils/digester.hh" #include "full_position.hh" #include "idl/query.dist.hh" #include "idl/query.dist.impl.hh" diff --git a/query-result.hh b/query-result.hh index a86d92ed11..bc04e8de40 100644 --- a/query-result.hh +++ b/query-result.hh @@ -9,7 +9,7 @@ #pragma once #include "bytes_ostream.hh" -#include "digest_algorithm.hh" +#include "utils/digest_algorithm.hh" #include "query-request.hh" #include "full_position.hh" #include diff --git a/repair/decorated_key_with_hash.hh b/repair/decorated_key_with_hash.hh index 0adf0fbcc2..6667962c01 100644 --- a/repair/decorated_key_with_hash.hh +++ b/repair/decorated_key_with_hash.hh @@ -7,7 +7,7 @@ */ #pragma once -#include "xx_hasher.hh" +#include "utils/xx_hasher.hh" #include "repair/hash.hh" #include "dht/i_partitioner.hh" diff --git a/repair/repair.cc b/repair/repair.cc index 91153e233c..7908c048ea 100644 --- a/repair/repair.cc +++ b/repair/repair.cc @@ -20,7 +20,7 @@ #include "sstables/sstables.hh" #include "replica/database.hh" #include "db/config.hh" -#include "hashers.hh" +#include "utils/hashers.hh" #include "locator/network_topology_strategy.hh" #include "service/migration_manager.hh" #include "partition_range_compat.hh" diff --git a/repair/row_level.cc b/repair/row_level.cc index a73ac22a83..a4e27ab373 100644 --- a/repair/row_level.cc +++ b/repair/row_level.cc @@ -17,7 +17,7 @@ #include "dht/i_partitioner.hh" #include "dht/sharder.hh" #include "to_string.hh" -#include "xx_hasher.hh" +#include "utils/xx_hasher.hh" #include "utils/UUID.hh" #include "utils/hash.hh" #include "service/priority_manager.hh" @@ -55,7 +55,7 @@ #include "repair/decorated_key_with_hash.hh" #include "repair/row.hh" #include "repair/writer.hh" -#include "xx_hasher.hh" +#include "utils/xx_hasher.hh" extern logging::logger rlogger; diff --git a/schema_mutations.cc b/schema_mutations.cc index 4869fc9cd0..1a872a4847 100644 --- a/schema_mutations.cc +++ b/schema_mutations.cc @@ -9,7 +9,7 @@ #include "schema_mutations.hh" #include "mutation/canonical_mutation.hh" #include "db/schema_tables.hh" -#include "hashers.hh" +#include "utils/hashers.hh" #include "utils/UUID_gen.hh" schema_mutations::schema_mutations(canonical_mutation columnfamilies, diff --git a/service/paxos/paxos_state.hh b/service/paxos/paxos_state.hh index 8b7cd1062e..e582841838 100644 --- a/service/paxos/paxos_state.hh +++ b/service/paxos/paxos_state.hh @@ -9,7 +9,7 @@ #pragma once #include "service/paxos/proposal.hh" #include "log.hh" -#include "digest_algorithm.hh" +#include "utils/digest_algorithm.hh" #include "db/timeout_clock.hh" #include #include "utils/UUID_gen.hh" diff --git a/test/boost/hashers_test.cc b/test/boost/hashers_test.cc index 5873a5dc19..5e1256f8f2 100644 --- a/test/boost/hashers_test.cc +++ b/test/boost/hashers_test.cc @@ -11,8 +11,8 @@ #include #include "test/lib/scylla_test_case.hh" #include -#include "hashers.hh" -#include "xx_hasher.hh" +#include "utils/hashers.hh" +#include "utils/xx_hasher.hh" #include "gc_clock.hh" #include "test/lib/simple_schema.hh" #include "reader_concurrency_semaphore.hh" diff --git a/test/boost/mutation_test.cc b/test/boost/mutation_test.cc index 5526927ed3..9c7d4fceb3 100644 --- a/test/boost/mutation_test.cc +++ b/test/boost/mutation_test.cc @@ -13,8 +13,8 @@ #include #include #include "mutation_query.hh" -#include "hashers.hh" -#include "xx_hasher.hh" +#include "utils/hashers.hh" +#include "utils/xx_hasher.hh" #include #include diff --git a/test/raft/replication.hh b/test/raft/replication.hh index fd7a72bd43..31456885cb 100644 --- a/test/raft/replication.hh +++ b/test/raft/replication.hh @@ -26,7 +26,7 @@ #include "raft/server.hh" #include "serializer.hh" #include "serializer_impl.hh" -#include "xx_hasher.hh" +#include "utils/xx_hasher.hh" #include "test/raft/helpers.hh" #include "test/lib/eventually.hh" #include "test/lib/random_utils.hh" diff --git a/types.hh b/types.hh index 769aba8090..22dc2dc31d 100644 --- a/types.hh +++ b/types.hh @@ -27,7 +27,7 @@ #include #include #include -#include "hashing.hh" +#include "utils/hashing.hh" #include "utils/fragmented_temporary_buffer.hh" #include "utils/exceptions.hh" #include "utils/managed_bytes.hh" diff --git a/utils/UUID.hh b/utils/UUID.hh index aff842b151..24d2d19a3e 100644 --- a/utils/UUID.hh +++ b/utils/UUID.hh @@ -20,7 +20,7 @@ #include #include #include "bytes.hh" -#include "hashing.hh" +#include "utils/hashing.hh" #include "utils/serialization.hh" namespace utils { diff --git a/utils/UUID_gen.cc b/utils/UUID_gen.cc index 21f9f9b2fc..f71c62a11d 100644 --- a/utils/UUID_gen.cc +++ b/utils/UUID_gen.cc @@ -16,7 +16,7 @@ #endif // __linux__ #include -#include "hashers.hh" +#include "utils/hashers.hh" namespace utils { diff --git a/digest_algorithm.hh b/utils/digest_algorithm.hh similarity index 100% rename from digest_algorithm.hh rename to utils/digest_algorithm.hh diff --git a/digester.hh b/utils/digester.hh similarity index 95% rename from digester.hh rename to utils/digester.hh index 80600cdff7..93c0e95ad6 100644 --- a/digester.hh +++ b/utils/digester.hh @@ -8,9 +8,9 @@ #pragma once -#include "digest_algorithm.hh" -#include "hashers.hh" -#include "xx_hasher.hh" +#include "utils/digest_algorithm.hh" +#include "utils/hashers.hh" +#include "utils/xx_hasher.hh" #include #include diff --git a/hashers.cc b/utils/hashers.cc similarity index 99% rename from hashers.cc rename to utils/hashers.cc index 147cf56779..e65b03bfc4 100644 --- a/hashers.cc +++ b/utils/hashers.cc @@ -6,7 +6,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include "hashers.hh" +#include "utils/hashers.hh" #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 #include diff --git a/hashers.hh b/utils/hashers.hh similarity index 97% rename from hashers.hh rename to utils/hashers.hh index 97bf6dfcbb..553ee81b26 100644 --- a/hashers.hh +++ b/utils/hashers.hh @@ -9,7 +9,7 @@ #pragma once #include "bytes.hh" -#include "hashing.hh" +#include "utils/hashing.hh" class md5_hasher; diff --git a/hashing.hh b/utils/hashing.hh similarity index 100% rename from hashing.hh rename to utils/hashing.hh diff --git a/xx_hasher.hh b/utils/xx_hasher.hh similarity index 100% rename from xx_hasher.hh rename to utils/xx_hasher.hh