chg: [correlation] Do not try to unblock value if doing full correlation

pull/8693/head
Jakub Onderka 2022-10-21 19:16:47 +02:00
parent f3d0fcebbb
commit 7615123738
2 changed files with 6 additions and 8 deletions

View File

@ -501,7 +501,7 @@ class Correlation extends AppModel
// If we have more correlations for the value than the limit, set the block entry and stop the correlation process
$this->OverCorrelatingValue->block($cV);
return true;
} else if ($count !== 0) {
} else if ($count !== 0 && !$full) {
// If we have fewer hits than the limit, proceed with the correlation, but first make sure we remove any existing blockers
$this->OverCorrelatingValue->unblock($cV);
}

View File

@ -59,13 +59,11 @@ class OverCorrelatingValue extends AppModel
*/
public function unblock($value)
{
if ($this->isBlocked($value)) {
$value = self::truncate($value);
$this->deleteAll([
'OverCorrelatingValue.value' => $value,
], false);
$this->blockedValues[$value] = false;
}
$value = self::truncate($value);
$this->deleteAll([
'OverCorrelatingValue.value' => $value,
], false);
$this->blockedValues[$value] = false;
}
public function cleanCache()