You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2016/08/05 12:31:26 UTC

[Bug 7340] New: BayesStore: bayes_expire table grows, remove_running_expire_tok not called

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7340

            Bug ID: 7340
           Summary: BayesStore: bayes_expire table grows,
                    remove_running_expire_tok not called
           Product: Spamassassin
           Version: 3.3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Learner
          Assignee: dev@spamassassin.apache.org
          Reporter: arnd.hannemann@credativ.de

# Symptoms
When Bayes is used with an SQL backend (PostgreSQL in the observed case),
and autoexpiry is disabled, the bayes_expire table keeps growing for every
sa-learn --force-expire call.

# Analysis
When Expiry is triggered a row gets inserted via set_running_expire_tok into
the bayes_expire table.
However it never get's delete, except:
- if token to expire < 1000
- if $max_expire_mult would not expire any tokens 

# Effects on Runtime
Because learner_is_scan_available calls  $self->_opportunistic_calls(1); which
calls $self->{store}->get_running_expire_tok(); every client
will do a sequential scan on this table SELECT max(runtime) from bayes_expire
WHERE id = ?"; which takes longer and longer as the bayes_expire table
continues to grow.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7340] BayesStore: bayes_expire table grows, remove_running_expire_tok not called

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7340

--- Comment #2 from Arnd <ar...@credativ.de> ---
Ping.

Anything I can do to help to get this issue resolved?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7340] BayesStore: bayes_expire table grows, remove_running_expire_tok not called

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7340

Arnd <ar...@credativ.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arnd.hannemann@credativ.de

--- Comment #1 from Arnd <ar...@credativ.de> ---
Created attachment 5432
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5432&action=edit
Patch making sure expire flag is cleaned up when expiry was run

Make sure remove_running_expire_tok is called when expiry finished, and thus
remove the row in the database that indicates that an expiry is currently
running.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7340] BayesStore: bayes_expire table grows, remove_running_expire_tok not called

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7340

Karsten Bräckelmann <gu...@rudersport.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Karsten Bräckelmann <gu...@rudersport.de> ---
Thank you for the report and analysis, Arnd.

After completing the token expiration, the flag meant to indicate expiration in
progress would erroneously be left dangling. Committed to trunk and stable 3.4
branch respectively:

Sending        SpamAssassin/BayesStore.pm
Committed revision 1805348.

Sending        SpamAssassin/BayesStore.pm
Committed revision 1805349.

Closing RESOLVED FIXED.

-- 
You are receiving this mail because:
You are the assignee for the bug.