Skip to content
Snippets Groups Projects
Commit 0edeaa35 authored by ajf5's avatar ajf5
Browse files

idk

parent b70fc7c5
No related branches found
No related tags found
No related merge requests found
...@@ -765,7 +765,7 @@ void Node::checkFileListConsistency(){ ...@@ -765,7 +765,7 @@ void Node::checkFileListConsistency(){
} }
for (auto& element: fileList) { for (auto& element: fileList) {
if(element.second.size() < 4){ if(element.second.size() < 4){
cout << "Need to rereplicate " << element.first << endl; //cout << "Need to rereplicate " << element.first << endl;
//First check the closest node, successor and predecessor //First check the closest node, successor and predecessor
int closestNodePostion = hashRing->locateClosestNode(element.first); int closestNodePostion = hashRing->locateClosestNode(element.first);
int pred = hashRing->getPredecessor(closestNodePostion); int pred = hashRing->getPredecessor(closestNodePostion);
...@@ -823,7 +823,7 @@ vector<tuple<string,string, string>> Node::getRandomNodesToGossipTo() ...@@ -823,7 +823,7 @@ vector<tuple<string,string, string>> Node::getRandomNodesToGossipTo()
void Node::handleMaplejuiceQ(){ void Node::handleMaplejuiceQ(){
if (!maplejuiceQ.empty() && !workerRing->size() && !isBlackout){ if (!maplejuiceQ.empty() && !workerRing->size() && !isBlackout){
for (auto &e: fileList) { for (auto &e: fileList) {
if (e.second.size() < 4) return; //make sure replication is good first if (e.second.size() < 3) return; //make sure replication is good first
} }
string msgCopy(maplejuiceQ.front()); string msgCopy(maplejuiceQ.front());
cout << "[QUEUE] sending next maple/juice to be processed " << msgCopy << endl; cout << "[QUEUE] sending next maple/juice to be processed " << msgCopy << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment