We add the remove_non_local_host_ids() helper, which will be used in the next commit to support the read path. HostIdVector concept is introduced to be able to handle both host_id_vector_replica_set and host_id_vector_topology_change uniformly. The storage_proxy_coordinator_mutate_options class is declared outside of storage_proxy to avoid C++ compiler complaints about default field initializers. In particular, some storage_proxy methods use this class for optional parameters with default values, which is not allowed when the class is defined inside storage_proxy.
27 lines
756 B
C++
27 lines
756 B
C++
/*
|
|
* Copyright (C) 2021-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "gms/inet_address.hh"
|
|
#include "locator/host_id.hh"
|
|
#include "utils/small_vector.hh"
|
|
|
|
using inet_address_vector_replica_set = utils::small_vector<gms::inet_address, 3>;
|
|
|
|
using inet_address_vector_topology_change = utils::small_vector<gms::inet_address, 1>;
|
|
|
|
using host_id_vector_replica_set = utils::small_vector<locator::host_id, 3>;
|
|
|
|
using host_id_vector_topology_change = utils::small_vector<locator::host_id, 1>;
|
|
|
|
template <typename T>
|
|
concept HostIdVector =
|
|
std::same_as<std::remove_cvref_t<T>, host_id_vector_replica_set> ||
|
|
std::same_as<std::remove_cvref_t<T>, host_id_vector_topology_change>;
|