History

Remove debugging code, some thread safety changes

Roxanne Skelly committed 7 years ago

Commit c7b04861 parent 1e1437a5 files · +23 −59Browse files

Showing the changes to libraries/networking/src/ThreadedAssignment.cpp (1 of 5 files). Show all

Unified · Split

libraries/networking/src/ThreadedAssignment.cpp+4−7
@@ -37,7 +37,6 @@ ThreadedAssignment::ThreadedAssignment(ReceivedMessage& message) : · 36 unmodified lines
3737 // if the NL tells us we got a DS response, clear our member variable of queued check-ins
3838 auto nodeList = DependencyManager::get<NodeList>();
3939 connect(nodeList.data(), &NodeList::receivedDomainServerList, this, &ThreadedAssignment::clearQueuedCheckIns);
40− timestamp = p_high_resolution_clock::now();
4140 }
4241
4342 void ThreadedAssignment::setFinished(bool isFinished) {
@@ -106,8 +105,6 @@ void ThreadedAssignment::addPacketStatsAndSendStatsPacket(QJsonObject statsObjec · 62 unmodified lines
106105 QJsonObject assignmentStats;
107106 assignmentStats["numQueuedCheckIns"] = _numQueuedCheckIns;
108107
109− assignmentStats["globalPostedEventCount"] = nodeList->getGlobalPostedEventCount();
110−
111108 statsObject["assignmentStats"] = assignmentStats;
112109
113110 nodeList->sendStatsToDomainServer(statsObject);
@@ -121,16 +118,16 @@ void ThreadedAssignment::sendStatsPacket() { · 7 unmodified lines
121118 void ThreadedAssignment::checkInWithDomainServerOrExit() {
122119 // verify that the number of queued check-ins is not >= our max
123120 // the number of queued check-ins is cleared anytime we get a response from the domain-server
124−
125− timestamp = p_high_resolution_clock::now();
126−
127121 if (_numQueuedCheckIns >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
128122 qCDebug(networking) << "At least" << MAX_SILENT_DOMAIN_SERVER_CHECK_INS << "have been queued without a response from domain-server"
129123 << "Stopping the current assignment";
130124 stop();
131125 } else {
132126 auto nodeList = DependencyManager::get<NodeList>();
133− QMetaObject::invokeMethod(nodeList.data(), "sendDomainServerCheckIn", Qt::DirectConnection);
127+ // Call sendDomainServerCheckIn directly instead of putting it on
128+ // the event queue. Under high load, the event queue can back up
129+ // longer than the total timeout period and cause a restart
130+ nodeList->sendDomainServerCheckIn();
134131
135132 // increase the number of queued check ins
136133 _numQueuedCheckIns++;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t