storage_service, api: Add API to migrate a tablet

Will be used in tests, or for hot fixes in production.
This commit is contained in:
Tomasz Grabiec
2023-11-22 17:28:29 +01:00
parent 31c995332c
commit 1f57d1ea28
8 changed files with 199 additions and 0 deletions

View File

@@ -125,6 +125,11 @@ bool contains(const tablet_replica_set& rs, host_id host) {
return false;
}
inline
bool contains(const tablet_replica_set& rs, const tablet_replica& r) {
return std::ranges::any_of(rs, [&] (auto&& r_) { return r_ == r; });
}
/// Stores information about a single tablet.
struct tablet_info {
tablet_replica_set replicas;