]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[CritFix] Fix issue with inconsistent resorting
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 28 Feb 2016 11:58:14 +0000 (11:58 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 28 Feb 2016 11:58:14 +0000 (11:58 +0000)
commitf309a84d17bce0456f369b693ae270288e72892f
tree4046a179935d8982b58ad14eec927ed40640dfd1
parent512d64b8f33e09908a574b48fcce4c06bb97e4bd
[CritFix] Fix issue with inconsistent resorting

This is a long term issue that was in rspamd for many years. Sometimes,
some rules are not scanned or scanned twice. That happened because of
resorting called during pending tasks exist in the wait queue. In this
case, resorting breaks logic of symbols processing, causing unprocessed
rules to be treated as processed and, vice versa, processed rules as
unprocessed.

This commit introduces refcounted approach for resorting keeping state
for each individual task. This allows to resort independently from the
existing tasks waiting in the queue.
src/libserver/symbols_cache.c