cluster: Yet another fix.

This commit is contained in:
Gunnar Beutner 2013-09-16 10:00:06 +02:00
parent 790ccc1079
commit 235efa107b
1 changed files with 2 additions and 2 deletions

View File

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