utils: move hashing related files to utils/ module

Closes #12884
This commit is contained in:
Avi Kivity
2023-02-15 22:40:00 +02:00
committed by Botond Dénes
parent 2f0cb9e68f
commit e2f6e0b848
39 changed files with 45 additions and 45 deletions

View File

@@ -221,7 +221,6 @@ set(scylla_sources
gms/inet_address.cc gms/inet_address.cc
gms/versioned_value.cc gms/versioned_value.cc
gms/version_generator.cc gms/version_generator.cc
hashers.cc
index/secondary_index.cc index/secondary_index.cc
index/secondary_index_manager.cc index/secondary_index_manager.cc
init.cc init.cc
@@ -398,6 +397,7 @@ set(scylla_sources
utils/generation-number.cc utils/generation-number.cc
utils/gz/crc_combine.cc utils/gz/crc_combine.cc
utils/gz/crc_combine_table.cc utils/gz/crc_combine_table.cc
utils/hashers.cc
utils/human_readable.cc utils/human_readable.cc
utils/i_filter.cc utils/i_filter.cc
utils/large_bitset.cc utils/large_bitset.cc

View File

@@ -11,7 +11,7 @@
#include <string> #include <string>
#include <string_view> #include <string_view>
#include <gnutls/crypto.h> #include <gnutls/crypto.h>
#include "hashers.hh" #include "utils/hashers.hh"
#include "bytes.hh" #include "bytes.hh"
#include "alternator/auth.hh" #include "alternator/auth.hh"
#include <fmt/format.h> #include <fmt/format.h>

View File

@@ -10,7 +10,7 @@
#include "seastarx.hh" #include "seastarx.hh"
#include <seastar/core/sstring.hh> #include <seastar/core/sstring.hh>
#include "hashing.hh" #include "utils/hashing.hh"
#include <optional> #include <optional>
#include <iosfwd> #include <iosfwd>
#include <functional> #include <functional>

View File

@@ -12,7 +12,7 @@
#include "bytes.hh" #include "bytes.hh"
#include "utils/managed_bytes.hh" #include "utils/managed_bytes.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include <seastar/core/simple-stream.hh> #include <seastar/core/simple-stream.hh>
#include <seastar/core/loop.hh> #include <seastar/core/loop.hh>
#include <bit> #include <bit>

View File

@@ -12,7 +12,7 @@
#include "utils/small_vector.hh" #include "utils/small_vector.hh"
#include "mutation/mutation_partition.hh" #include "mutation/mutation_partition.hh"
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
#include "db/timeout_clock.hh" #include "db/timeout_clock.hh"

View File

@@ -676,7 +676,6 @@ scylla_core = (['message/messaging_service.cc',
'collection_mutation.cc', 'collection_mutation.cc',
'client_data.cc', 'client_data.cc',
'debug.cc', 'debug.cc',
'hashers.cc',
'schema/caching_options.cc', 'schema/caching_options.cc',
'schema/schema.cc', 'schema/schema.cc',
'schema/schema_registry.cc', 'schema/schema_registry.cc',
@@ -995,6 +994,7 @@ scylla_core = (['message/messaging_service.cc',
'tombstone_gc_options.cc', 'tombstone_gc_options.cc',
'tombstone_gc.cc', 'tombstone_gc.cc',
'utils/disk-error-handler.cc', 'utils/disk-error-handler.cc',
'utils/hashers.cc',
'duration.cc', 'duration.cc',
'vint-serialization.cc', 'vint-serialization.cc',
'utils/arch/powerpc/crc32-vpmsum/crc32_wrapper.cc', 'utils/arch/powerpc/crc32-vpmsum/crc32_wrapper.cc',
@@ -1281,7 +1281,7 @@ deps['test/boost/bytes_ostream_test'] = [
"test/lib/log.cc", "test/lib/log.cc",
] ]
deps['test/boost/input_stream_test'] = ['test/boost/input_stream_test.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/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/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'] deps['test/boost/log_heap_test'] = ['test/boost/log_heap_test.cc']

View File

@@ -21,7 +21,7 @@
#include "cql3/untyped_result_set.hh" #include "cql3/untyped_result_set.hh"
#include "db/config.hh" #include "db/config.hh"
#include "data_dictionary/data_dictionary.hh" #include "data_dictionary/data_dictionary.hh"
#include "hashers.hh" #include "utils/hashers.hh"
#include "utils/error_injection.hh" #include "utils/error_injection.hh"
namespace cql3 { namespace cql3 {

View File

@@ -39,7 +39,7 @@
#include "db/marshal/type_parser.hh" #include "db/marshal/type_parser.hh"
#include "db/config.hh" #include "db/config.hh"
#include "db/extensions.hh" #include "db/extensions.hh"
#include "hashers.hh" #include "utils/hashers.hh"
#include <seastar/util/noncopyable_function.hh> #include <seastar/util/noncopyable_function.hh>
#include <seastar/rpc/rpc_types.hh> #include <seastar/rpc/rpc_types.hh>

View File

@@ -13,7 +13,7 @@
#include "db/commitlog/replay_position.hh" #include "db/commitlog/replay_position.hh"
#include "schema/schema_fwd.hh" #include "schema/schema_fwd.hh"
#include "schema_features.hh" #include "schema_features.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include "schema_mutations.hh" #include "schema_mutations.hh"
#include "types/map.hh" #include "types/map.hh"
#include "query-result-set.hh" #include "query-result-set.hh"

View File

@@ -37,7 +37,7 @@
#include "gms/feature_service.hh" #include "gms/feature_service.hh"
#include "system_keyspace_view_types.hh" #include "system_keyspace_view_types.hh"
#include "schema/schema_builder.hh" #include "schema/schema_builder.hh"
#include "hashers.hh" #include "utils/hashers.hh"
#include "release.hh" #include "release.hh"
#include "log.hh" #include "log.hh"
#include <seastar/core/enum.hh> #include <seastar/core/enum.hh>

View File

@@ -9,7 +9,7 @@
#pragma once #pragma once
#include "clocks-impl.hh" #include "clocks-impl.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include <seastar/core/lowres_clock.hh> #include <seastar/core/lowres_clock.hh>

View File

@@ -9,7 +9,7 @@
#pragma once #pragma once
#include "mutation/mutation_partition_visitor.hh" #include "mutation/mutation_partition_visitor.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include "schema/schema.hh" #include "schema/schema.hh"
#include "mutation/atomic_cell_hash.hh" #include "mutation/atomic_cell_hash.hh"
#include "keys.hh" #include "keys.hh"

View File

@@ -12,7 +12,7 @@
#include "types.hh" #include "types.hh"
#include "compound_compat.hh" #include "compound_compat.hh"
#include "utils/managed_bytes.hh" #include "utils/managed_bytes.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include "replica/database_fwd.hh" #include "replica/database_fwd.hh"
#include "schema/schema_fwd.hh" #include "schema/schema_fwd.hh"
#include <compare> #include <compare>

View File

@@ -29,13 +29,13 @@
#include "range.hh" #include "range.hh"
#include "frozen_schema.hh" #include "frozen_schema.hh"
#include "repair/repair.hh" #include "repair/repair.hh"
#include "digest_algorithm.hh" #include "utils/digest_algorithm.hh"
#include "service/paxos/proposal.hh" #include "service/paxos/proposal.hh"
#include "service/paxos/prepare_response.hh" #include "service/paxos/prepare_response.hh"
#include "query-request.hh" #include "query-request.hh"
#include "mutation_query.hh" #include "mutation_query.hh"
#include "repair/repair.hh" #include "repair/repair.hh"
#include "digest_algorithm.hh" #include "utils/digest_algorithm.hh"
#include "streaming/stream_reason.hh" #include "streaming/stream_reason.hh"
#include "streaming/stream_mutation_fragments_cmd.hh" #include "streaming/stream_mutation_fragments_cmd.hh"
#include "cache_temperature.hh" #include "cache_temperature.hh"

View File

@@ -14,7 +14,7 @@
#include "types/collection.hh" #include "types/collection.hh"
#include "atomic_cell.hh" #include "atomic_cell.hh"
#include "atomic_cell_or_collection.hh" #include "atomic_cell_or_collection.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include "counters.hh" #include "counters.hh"
template<> template<>

View File

@@ -14,7 +14,7 @@
#include "keys.hh" #include "keys.hh"
#include "schema/schema_fwd.hh" #include "schema/schema_fwd.hh"
#include "dht/i_partitioner.hh" #include "dht/i_partitioner.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include "mutation_fragment_v2.hh" #include "mutation_fragment_v2.hh"
#include "mutation_consumer.hh" #include "mutation_consumer.hh"
#include "range_tombstone_change_generator.hh" #include "range_tombstone_change_generator.hh"

View File

@@ -13,8 +13,8 @@
#include "mutation_fragment.hh" #include "mutation_fragment.hh"
#include "mutation_fragment_v2.hh" #include "mutation_fragment_v2.hh"
#include "clustering_interval_set.hh" #include "clustering_interval_set.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
std::ostream& std::ostream&
operator<<(std::ostream& os, const clustering_row::printer& p) { operator<<(std::ostream& os, const clustering_row::printer& p) {

View File

@@ -10,7 +10,7 @@
#include <boost/intrusive/set.hpp> #include <boost/intrusive/set.hpp>
#include <optional> #include <optional>
#include "hashing.hh" #include "utils/hashing.hh"
#include "keys.hh" #include "keys.hh"
#include "mutation/tombstone.hh" #include "mutation/tombstone.hh"
#include "clustering_bounds_comparator.hh" #include "clustering_bounds_comparator.hh"

View File

@@ -13,7 +13,7 @@
#include "timestamp.hh" #include "timestamp.hh"
#include "gc_clock.hh" #include "gc_clock.hh"
#include "hashing.hh" #include "utils/hashing.hh"
/** /**
* Represents deletion operation. Can be commuted with other tombstones via apply() method. * Represents deletion operation. Can be commuted with other tombstones via apply() method.

View File

@@ -12,7 +12,7 @@
#include <boost/range/numeric.hpp> #include <boost/range/numeric.hpp>
#include "query-result.hh" #include "query-result.hh"
#include "digest_algorithm.hh" #include "utils/digest_algorithm.hh"
#include "full_position.hh" #include "full_position.hh"
#include "idl/query.dist.hh" #include "idl/query.dist.hh"

View File

@@ -12,8 +12,8 @@
#include "mutation/atomic_cell.hh" #include "mutation/atomic_cell.hh"
#include "query-request.hh" #include "query-request.hh"
#include "query-result.hh" #include "query-result.hh"
#include "digest_algorithm.hh" #include "utils/digest_algorithm.hh"
#include "digester.hh" #include "utils/digester.hh"
#include "full_position.hh" #include "full_position.hh"
#include "idl/query.dist.hh" #include "idl/query.dist.hh"
#include "idl/query.dist.impl.hh" #include "idl/query.dist.impl.hh"

View File

@@ -9,7 +9,7 @@
#pragma once #pragma once
#include "bytes_ostream.hh" #include "bytes_ostream.hh"
#include "digest_algorithm.hh" #include "utils/digest_algorithm.hh"
#include "query-request.hh" #include "query-request.hh"
#include "full_position.hh" #include "full_position.hh"
#include <optional> #include <optional>

View File

@@ -7,7 +7,7 @@
*/ */
#pragma once #pragma once
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
#include "repair/hash.hh" #include "repair/hash.hh"
#include "dht/i_partitioner.hh" #include "dht/i_partitioner.hh"

View File

@@ -20,7 +20,7 @@
#include "sstables/sstables.hh" #include "sstables/sstables.hh"
#include "replica/database.hh" #include "replica/database.hh"
#include "db/config.hh" #include "db/config.hh"
#include "hashers.hh" #include "utils/hashers.hh"
#include "locator/network_topology_strategy.hh" #include "locator/network_topology_strategy.hh"
#include "service/migration_manager.hh" #include "service/migration_manager.hh"
#include "partition_range_compat.hh" #include "partition_range_compat.hh"

View File

@@ -17,7 +17,7 @@
#include "dht/i_partitioner.hh" #include "dht/i_partitioner.hh"
#include "dht/sharder.hh" #include "dht/sharder.hh"
#include "to_string.hh" #include "to_string.hh"
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
#include "utils/UUID.hh" #include "utils/UUID.hh"
#include "utils/hash.hh" #include "utils/hash.hh"
#include "service/priority_manager.hh" #include "service/priority_manager.hh"
@@ -55,7 +55,7 @@
#include "repair/decorated_key_with_hash.hh" #include "repair/decorated_key_with_hash.hh"
#include "repair/row.hh" #include "repair/row.hh"
#include "repair/writer.hh" #include "repair/writer.hh"
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
extern logging::logger rlogger; extern logging::logger rlogger;

View File

@@ -9,7 +9,7 @@
#include "schema_mutations.hh" #include "schema_mutations.hh"
#include "mutation/canonical_mutation.hh" #include "mutation/canonical_mutation.hh"
#include "db/schema_tables.hh" #include "db/schema_tables.hh"
#include "hashers.hh" #include "utils/hashers.hh"
#include "utils/UUID_gen.hh" #include "utils/UUID_gen.hh"
schema_mutations::schema_mutations(canonical_mutation columnfamilies, schema_mutations::schema_mutations(canonical_mutation columnfamilies,

View File

@@ -9,7 +9,7 @@
#pragma once #pragma once
#include "service/paxos/proposal.hh" #include "service/paxos/proposal.hh"
#include "log.hh" #include "log.hh"
#include "digest_algorithm.hh" #include "utils/digest_algorithm.hh"
#include "db/timeout_clock.hh" #include "db/timeout_clock.hh"
#include <unordered_map> #include <unordered_map>
#include "utils/UUID_gen.hh" #include "utils/UUID_gen.hh"

View File

@@ -11,8 +11,8 @@
#include <seastar/util/closeable.hh> #include <seastar/util/closeable.hh>
#include "test/lib/scylla_test_case.hh" #include "test/lib/scylla_test_case.hh"
#include <seastar/testing/thread_test_case.hh> #include <seastar/testing/thread_test_case.hh>
#include "hashers.hh" #include "utils/hashers.hh"
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
#include "gc_clock.hh" #include "gc_clock.hh"
#include "test/lib/simple_schema.hh" #include "test/lib/simple_schema.hh"
#include "reader_concurrency_semaphore.hh" #include "reader_concurrency_semaphore.hh"

View File

@@ -13,8 +13,8 @@
#include <boost/range/algorithm_ext/push_back.hpp> #include <boost/range/algorithm_ext/push_back.hpp>
#include <boost/range/combine.hpp> #include <boost/range/combine.hpp>
#include "mutation_query.hh" #include "mutation_query.hh"
#include "hashers.hh" #include "utils/hashers.hh"
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
#include <seastar/core/sstring.hh> #include <seastar/core/sstring.hh>
#include <seastar/core/do_with.hh> #include <seastar/core/do_with.hh>

View File

@@ -26,7 +26,7 @@
#include "raft/server.hh" #include "raft/server.hh"
#include "serializer.hh" #include "serializer.hh"
#include "serializer_impl.hh" #include "serializer_impl.hh"
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
#include "test/raft/helpers.hh" #include "test/raft/helpers.hh"
#include "test/lib/eventually.hh" #include "test/lib/eventually.hh"
#include "test/lib/random_utils.hh" #include "test/lib/random_utils.hh"

View File

@@ -27,7 +27,7 @@
#include <seastar/net/ipv6_address.hh> #include <seastar/net/ipv6_address.hh>
#include <seastar/net/inet_address.hh> #include <seastar/net/inet_address.hh>
#include <seastar/util/backtrace.hh> #include <seastar/util/backtrace.hh>
#include "hashing.hh" #include "utils/hashing.hh"
#include "utils/fragmented_temporary_buffer.hh" #include "utils/fragmented_temporary_buffer.hh"
#include "utils/exceptions.hh" #include "utils/exceptions.hh"
#include "utils/managed_bytes.hh" #include "utils/managed_bytes.hh"

View File

@@ -20,7 +20,7 @@
#include <seastar/core/print.hh> #include <seastar/core/print.hh>
#include <seastar/net/byteorder.hh> #include <seastar/net/byteorder.hh>
#include "bytes.hh" #include "bytes.hh"
#include "hashing.hh" #include "utils/hashing.hh"
#include "utils/serialization.hh" #include "utils/serialization.hh"
namespace utils { namespace utils {

View File

@@ -16,7 +16,7 @@
#endif // __linux__ #endif // __linux__
#include <stdlib.h> #include <stdlib.h>
#include "hashers.hh" #include "utils/hashers.hh"
namespace utils { namespace utils {

View File

@@ -8,9 +8,9 @@
#pragma once #pragma once
#include "digest_algorithm.hh" #include "utils/digest_algorithm.hh"
#include "hashers.hh" #include "utils/hashers.hh"
#include "xx_hasher.hh" #include "utils/xx_hasher.hh"
#include <type_traits> #include <type_traits>
#include <variant> #include <variant>

View File

@@ -6,7 +6,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later
*/ */
#include "hashers.hh" #include "utils/hashers.hh"
#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
#include <cryptopp/md5.h> #include <cryptopp/md5.h>

View File

@@ -9,7 +9,7 @@
#pragma once #pragma once
#include "bytes.hh" #include "bytes.hh"
#include "hashing.hh" #include "utils/hashing.hh"
class md5_hasher; class md5_hasher;