Page MenuHomePhorge

Avoid large queries in greylist request
ClosedPublic

Authored by mollekopf on Aug 27 2021, 10:00 AM.
Tags
None
Referenced Files
F11587638: D2833.id8149.diff
Thu, Mar 28, 6:05 PM
Unknown Object (File)
Sun, Mar 10, 3:12 AM
Unknown Object (File)
Thu, Mar 7, 7:47 AM
Unknown Object (File)
Feb 9 2024, 6:38 AM
Unknown Object (File)
Jan 30 2024, 1:13 AM
Unknown Object (File)
Jan 27 2024, 8:57 PM
Unknown Object (File)
Jan 24 2024, 1:06 PM
Unknown Object (File)
Jan 24 2024, 6:55 AM
Subscribers
None

Details

Reviewers
vanmeeuwen
Group Reviewers
Restricted Project
Commits
rK8beb43d39950: Avoid large queries in greylist request
Summary

The assumption is that the following query can yield a lot of results
for e.g. gmail.com:

$entries = Connect::where(
    [
        'sender_domain' => $this->senderDomain,
        'net_id' => $this->netID,
        'net_type' => $this->netType
    ]
)
    ->whereDate('updated_at', '>=', $this->timestamp->copy()->subDays(7));

Instead of counting and updating all of them, we only to the minimum
work necessary:

  • Update all entries that are currently greylisted
  • Count if we have at least 5 entries to automatically create a whitelist

This changes that entries that already have greylisting = false will
not get updated_at updated.

Diff Detail

Repository
rK kolab
Branch
dev/mollekopf
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 36466
Build 14467: arc lint + arc unit

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Aug 27 2021, 10:00 AM
This revision is now accepted and ready to land.Aug 27 2021, 10:47 AM
This revision was automatically updated to reflect the committed changes.