Skip to content

Commit

Permalink
fix: return value for DflyMigrateAck (#4379)
Browse files Browse the repository at this point in the history
  • Loading branch information
BorysTheDev authored Dec 29, 2024
1 parent 5b9c7e4 commit c4be62e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/cluster/cluster_family.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/server/cluster/outgoing_slot_migration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c4be62e

Please sign in to comment.