From c4d538320ed38f5665c8d6fd577a91617e90539e Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 17 Apr 2024 10:49:59 +0300 Subject: [PATCH] tablets: Drop src vs dst equality check from move_tablet() The code here looks like this if src.host == dst.host throw "Local migration not possible" if src == dst co_return; The 2nd check is apparently never satisfied -- if src == dst this means that src.host == dst.host and it should have thrown already Signed-off-by: Pavel Emelyanov --- service/storage_service.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/service/storage_service.cc b/service/storage_service.cc index 5170774041..94724e1a65 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -5747,10 +5747,6 @@ future<> storage_service::move_tablet(table_id table, dht::token token, locator: throw std::runtime_error("Migrating within the same node is not supported"); } - if (src == dst) { - co_return; - } - if (locator::contains(tinfo.replicas, dst.host)) { throw std::runtime_error(fmt::format("Tablet {} has replica on {}", gid, dst.host)); }