@@ -76,18 +76,22 @@ class TNodeBroker::TTxRegisterNode : public TTransactionBase<TNodeBroker> {
7676 auto &node = Self->Nodes .find (it->second )->second ;
7777 NodeId = node.NodeId ;
7878
79- if (node.Address != rec.GetAddress ()
80- || node.ResolveHost != rec.GetResolveHost ())
81- return Error (TStatus::WRONG_REQUEST,
82- TStringBuilder () << " Another address is registered for "
83- << host << " :" << port,
84- ctx);
79+ if (node.Address != rec.GetAddress () || node.ResolveHost != rec.GetResolveHost ()) {
80+ auto errorText = TStringBuilder () << " Another address is registered for " << host << " :" << port
81+ << " , expected (address, resolve host) = (" << node.Address << " , " << node.ResolveHost << " )"
82+ << " , got (address, resolve host) = (" << rec.GetAddress () << " , " << rec.GetResolveHost () << " )" ;
83+
84+ LOG_WARN_S (ctx, NKikimrServices::NODE_BROKER, errorText);
85+ return Error (TStatus::WRONG_REQUEST, errorText, ctx);
86+ }
8587
8688 if (node.Location != loc && node.Location != TNodeLocation ()) {
87- return Error (TStatus::WRONG_REQUEST,
88- TStringBuilder () << " Another location is registered for "
89- << host << " :" << port,
90- ctx);
89+ auto errorText = TStringBuilder () << " Another location is registered for " << host << " :" << port
90+ << " , expected = " << node.Location .ToString ()
91+ << " , got = " << loc.ToString ();
92+
93+ LOG_WARN_S (ctx, NKikimrServices::NODE_BROKER, errorText);
94+ return Error (TStatus::WRONG_REQUEST, errorText, ctx);
9195 } else if (node.Location != loc) {
9296 node.Location = loc;
9397 Self->DbUpdateNodeLocation (node, txc);
0 commit comments