]> Sergey Matveev's repositories - public-inbox.git/commit
watch: avoid unnecessary spawning on spam removals
authorEric Wong <e@yhbt.net>
Mon, 31 Aug 2020 04:41:34 +0000 (04:41 +0000)
committerEric Wong <e@80x24.org>
Tue, 1 Sep 2020 00:19:17 +0000 (00:19 +0000)
commit94ae705673cb03045a109041eec9a6704b8a735b
tree22ac480aaaff37bfe00c401b10ca2249876e2903
parent3bfbaacac15a14a379e360dc2d6c5989f49c3769
watch: avoid unnecessary spawning on spam removals

This should further mitigate lock contention problems
when -watch is configured to watch on a Maildir for spam
while performing a large NNTP import.

There is now a small risk a message won't get removed because if
it's in the current (uncommitted) fast-import batch, but
unlikely given the batch size is now only 10 messages.

If a that small window is hit, flipping the \Seen flag
(e.g. marking it unread, and then read again) will trigger
another removal attempt via IMAP or Maildir.
lib/PublicInbox/Import.pm
lib/PublicInbox/V2Writable.pm
lib/PublicInbox/Watch.pm