From ae382196f11e163b2fcbf51dfcdaf9737a568b6d Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Fri, 19 Jan 2024 12:00:00 +0100 Subject: [PATCH] tablets: Move tablet_migration_info to tablets.hh Will add methods which operate on it to tablets.hh where they belong. --- locator/tablets.hh | 8 ++++++++ service/tablet_allocator.hh | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/locator/tablets.hh b/locator/tablets.hh index 8dde6a189b..883d78f9b0 100644 --- a/locator/tablets.hh +++ b/locator/tablets.hh @@ -201,6 +201,14 @@ struct tablet_transition_info { // Returns the leaving replica for a given transition. tablet_replica get_leaving_replica(const tablet_info&, const tablet_transition_info&); +/// Represents intention to move a single tablet replica from src to dst. +struct tablet_migration_info { + locator::tablet_transition_kind kind; + locator::global_tablet_id tablet; + locator::tablet_replica src; + locator::tablet_replica dst; +}; + /// Describes streaming required for a given tablet transition. struct tablet_migration_streaming_info { std::unordered_set read_from; diff --git a/service/tablet_allocator.hh b/service/tablet_allocator.hh index 6d8782a2ff..b00bf8a066 100644 --- a/service/tablet_allocator.hh +++ b/service/tablet_allocator.hh @@ -13,13 +13,7 @@ namespace service { -/// Represents intention to move a single tablet replica from src to dst. -struct tablet_migration_info { - locator::tablet_transition_kind kind; - locator::global_tablet_id tablet; - locator::tablet_replica src; - locator::tablet_replica dst; -}; +using tablet_migration_info = locator::tablet_migration_info; class migration_plan { public: