From c4be62edc86052610e7e301c025c9581d858d0b3 Mon Sep 17 00:00:00 2001 From: Borys Date: Sun, 29 Dec 2024 09:37:08 +0200 Subject: [PATCH] fix: return value for DflyMigrateAck (#4379) --- src/server/cluster/cluster_family.cc | 2 +- src/server/cluster/outgoing_slot_migration.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/cluster/cluster_family.cc b/src/server/cluster/cluster_family.cc index db6d41bd5..b76cb5ab4 100644 --- a/src/server/cluster/cluster_family.cc +++ b/src/server/cluster/cluster_family.cc @@ -1012,7 +1012,7 @@ void ClusterFamily::DflyMigrateAck(CmdArgList args, SinkReplyBuilder* builder) { [source_id = source_id](const auto& m) { return m.node_info.id == source_id; }); if (m_it == in_migrations.end()) { LOG(WARNING) << "migration isn't in config"; - return builder->SendLong(OutgoingMigration::kInvalidAttempt); + return builder->SendError(OutgoingMigration::kUnknownMigration); } auto migration = GetIncomingMigration(source_id); diff --git a/src/server/cluster/outgoing_slot_migration.h b/src/server/cluster/outgoing_slot_migration.h index d1ce69f15..eda8ef441 100644 --- a/src/server/cluster/outgoing_slot_migration.h +++ b/src/server/cluster/outgoing_slot_migration.h @@ -59,7 +59,6 @@ class OutgoingMigration : private ProtocolClient { size_t GetKeyCount() const ABSL_LOCKS_EXCLUDED(state_mu_); - static constexpr long kInvalidAttempt = -1; static constexpr std::string_view kUnknownMigration = "UNKNOWN_MIGRATION"; private: