mirror of https://github.com/Icinga/icinga2.git
cluster: Yet another fix.
This commit is contained in:
parent
790ccc1079
commit
235efa107b
|
@ -324,7 +324,7 @@ void ClusterComponent::LogGlobHandler(std::vector<int>& files, const String& fil
|
||||||
|
|
||||||
void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Ptr& stream)
|
void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Ptr& stream)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = -1;
|
||||||
double peer_ts = endpoint->GetLocalLogPosition();
|
double peer_ts = endpoint->GetLocalLogPosition();
|
||||||
bool last_sync = false;
|
bool last_sync = false;
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Pt
|
||||||
Utility::Glob(GetClusterDir() + "log/*", boost::bind(&ClusterComponent::LogGlobHandler, boost::ref(files), _1));
|
Utility::Glob(GetClusterDir() + "log/*", boost::bind(&ClusterComponent::LogGlobHandler, boost::ref(files), _1));
|
||||||
std::sort(files.begin(), files.end());
|
std::sort(files.begin(), files.end());
|
||||||
|
|
||||||
if (count == 0 || count > 50000) {
|
if (count == -1 || count > 50000) {
|
||||||
OpenLogFile();
|
OpenLogFile();
|
||||||
olock.Unlock();
|
olock.Unlock();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue