mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
cluster: Speed up log replays.
This commit is contained in:
parent
0755d1b9d1
commit
2daa2cae85
@ -221,7 +221,7 @@ void ClusterComponent::RelayMessage(const Endpoint::Ptr& except, const Dictionar
|
|||||||
if (except)
|
if (except)
|
||||||
pmessage->Set("except", except->GetName());
|
pmessage->Set("except", except->GetName());
|
||||||
|
|
||||||
pmessage->Set("message", message);
|
pmessage->Set("message", Value(message).Serialize());
|
||||||
|
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
if (m_LogFile) {
|
if (m_LogFile) {
|
||||||
@ -360,8 +360,7 @@ void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Pt
|
|||||||
if (pmessage->Get("except") == endpoint->GetName())
|
if (pmessage->Get("except") == endpoint->GetName())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
String json = Value(pmessage->Get("message")).Serialize();
|
NetString::WriteStringToStream(stream, pmessage->Get("message"));
|
||||||
NetString::WriteStringToStream(stream, json);
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user