bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group

Teemu Likonen-2
Gnus mail and news client has "agent" feature for caching articles
locally. The local cache can be expired by command "M-x
gnus-agent-expire".

However, the expiry does not always expire all cached articles. It seems
that the expiry mechanism leaves one article file if there are not any
newer articles in the same group.

For example, currently in my system all article files older than
2021-02-08 have been expired. Yet one older file remains:

    $ cd "$HOME/News/agent/nntp"
    $ find . -type f -regex '.*/[0-9]+$' -print0 | \
        xargs -0r ls -gGltu | tail -n3

    -rw-r--r-- 1   1104 2021-02-08 08:10:18 ./september/alt/os/linux/69718
    -rw-r--r-- 1   5350 2021-02-08 08:10:04 ./gmane/gmane/emacs/gnus/user/19400
    -rw-r--r-- 1   5394 2021-02-05 19:41:11 ./gmane/gmane/ietf/openpgp/9871

There is one file with access time ("ls -ltu") 2021-02-05. It should
have been removed already but it is the last article in its group so it
remains. I think I have seen such articles expire after new article
arrives in the same group.

There is not any easy recipe for reproducing the behaviour. You have to
set up Gnus agent and make Gnus cache some articles. Here's a start:

    ;; Expire everything before today.
    (setq gnus-agent-expire-days 0)

    ;; Fetch all selected articles.
    (add-hook 'gnus-select-article-hook 'gnus-agent-fetch-selected-article)

--
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450

signature.asc (257 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group

Lars Ingebrigtsen
Teemu Likonen <[hidden email]> writes:

> There is one file with access time ("ls -ltu") 2021-02-05. It should
> have been removed already but it is the last article in its group so it
> remains.

I haven't tried to debug this, but this does sound familiar.  I seem to
vaguely remember that the Agent has to been the highest-numbered article
for accounting reasons?  So expiry doesn't touch the newest article.

I may be totally misremembering, though.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



Reply | Threaded
Open this post in threaded view
|

bug#46533: 27.1.91; (gnus-agent-expire) leaves the last article per group

Lars Ingebrigtsen
Lars Ingebrigtsen <[hidden email]> writes:

> I haven't tried to debug this, but this does sound familiar.  I seem to
> vaguely remember that the Agent has to been the highest-numbered article
> for accounting reasons?  So expiry doesn't touch the newest article.

Yup, I remembered correctly.  I've now documented this quirk in the Gnus
manual.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no