You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added multicolumn aggregation to DBA and improved three essential parts which suffer from many chunks (#1069)
* Adding loops to scan through lines to support importing hashes longer then 1024 bytes
* added multicolumn aggregation to DBA and improved three essential parts which suffer from many chunks
* applied requested changes (constants and query merge) for pull request #1069
---------
Co-authored-by: Jesse van Zutphen <[email protected]>
@@ -76,7 +78,7 @@ public function execute($QUERY = array()) {
76
78
if ($task == null) { // agent needs a new task
77
79
DServerLog::log(DServerLog::DEBUG, "Task is fully dispatched", [$this->agent]);
78
80
Factory::getAgentFactory()->getDB()->commit();
79
-
LockUtils::release(Lock::CHUNKING);
81
+
LockUtils::release($LOCKFILE);
80
82
DServerLog::log(DServerLog::TRACE, "Released lock for chunking!", [$this->agent]);
81
83
$this->sendResponse(array(
82
84
PResponseGetChunk::ACTION => PActions::GET_CHUNK,
@@ -93,22 +95,22 @@ public function execute($QUERY = array()) {
93
95
// this is a special case where this task is either not allowed anymore, or it has priority 0 so it doesn't get auto assigned
94
96
if (!AccessUtils::agentCanAccessTask($this->agent, $task)) {
95
97
Factory::getAgentFactory()->getDB()->commit();
96
-
LockUtils::release(Lock::CHUNKING);
98
+
LockUtils::release($LOCKFILE);
97
99
DServerLog::log(DServerLog::INFO, "Not allowed to work on requested task", [$this->agent, $task]);
98
100
DServerLog::log(DServerLog::TRACE, "Released lock for chunking!", [$this->agent]);
99
101
$this->sendErrorResponse(PActions::GET_CHUNK, "Not allowed to work on this task!");
100
102
}
101
103
if (TaskUtils::isSaturatedByOtherAgents($task, $this->agent)) {
102
104
Factory::getAgentFactory()->getDB()->commit();
103
-
LockUtils::release(Lock::CHUNKING);
105
+
LockUtils::release($LOCKFILE);
104
106
DServerLog::log(DServerLog::TRACE, "Released lock for chunking!", [$this->agent]);
105
107
$this->sendErrorResponse(PActions::GET_CHUNK, "Task already saturated by other agents, no other task available!");
106
108
}
107
109
}
108
110
109
111
if (TaskUtils::isSaturatedByOtherAgents($task, $this->agent)) {
110
112
Factory::getAgentFactory()->getDB()->commit();
111
-
LockUtils::release(Lock::CHUNKING);
113
+
LockUtils::release($LOCKFILE);
112
114
DServerLog::log(DServerLog::TRACE, "Released lock for chunking!", [$this->agent]);
113
115
$this->sendErrorResponse(PActions::GET_CHUNK, "Task already saturated by other agents, other tasks available!");
114
116
}
@@ -119,7 +121,7 @@ public function execute($QUERY = array()) {
119
121
if ($bestTask->getId() != $task->getId()) {
120
122
Factory::getAgentFactory()->getDB()->commit();
121
123
DServerLog::log(DServerLog::INFO, "Task with higher priority available!", [$this->agent]);
122
-
LockUtils::release(Lock::CHUNKING);
124
+
LockUtils::release($LOCKFILE);
123
125
DServerLog::log(DServerLog::TRACE, "Released lock for chunking!", [$this->agent]);
124
126
$this->sendErrorResponse(PActions::GET_CHUNK, "Task with higher priority available!");
125
127
}
@@ -150,7 +152,7 @@ public function execute($QUERY = array()) {
150
152
if ($chunk == null) {
151
153
DServerLog::log(DServerLog::DEBUG, "Could not create a chunk, task is fully dispatched", [$this->agent, $task]);
152
154
Factory::getAgentFactory()->getDB()->commit();
153
-
LockUtils::release(Lock::CHUNKING);
155
+
LockUtils::release($LOCKFILE);
154
156
DServerLog::log(DServerLog::TRACE, "Released lock for chunking!", [$this->agent]);
155
157
$this->sendResponse(array(
156
158
PResponseGetChunk::ACTION => PActions::GET_CHUNK,
@@ -171,7 +173,7 @@ protected function sendChunk($chunk) {
171
173
return; // this can be safely done before the commit/release, because the only sendChunk which comes really at the end check for null before, so a lock which is not released cannot happen
0 commit comments