fix: return value for DflyMigrateAck (#4379)

This commit is contained in:
Borys 2024-12-29 09:37:08 +02:00 committed by GitHub
parent 5b9c7e415a
commit c4be62edc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -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);

View file

@ -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: