Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: [PATCH] Two issues with the gnus-registry
Date: Fri, 24 Oct 2014 13:56:56 -0700	[thread overview]
Message-ID: <87ppdhyynb.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87egtx70hy.fsf@ericabrahamsen.net>

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Hi there,
>
> I'm using the gnus-registry in Gnorb to keep track of correspondences
> between Gnus messages and Org headings, using a key on the registry
> entries called 'gnorb-ids. This is meant to be a "precious" key, ie
> entries with this key are not pruned. So far so good:
>
> (oref gnus-registry-db :precious) => (gnorb-ids mark)
>
> But the entries still do get pruned! I've just had tracked entries start
> disappearing on me, and realized that they're getting pruned from the
> registry when I save it. There appear to be two problems here:

[...]

> And I really don't know why the precious entries are getting pruned.
> In a day or so, when I have more time, I'll test with a dummy registry,
> with max-entries set to 10 and 'creation-time added to the precious
> entries -- should make debugging easier.

Okay, I got curious (frustrated) and tried this, and I just don't get
it. `registry-prune' doesn't seem to work as advertised: first it
deletes according to `registry-prune-soft-candidates', which preserves
precious entries, and then it deletes according to
`registry-prune-hard-candidates', which doesn't.p

The second pass unconditionally caps the registry length at 90% of
`gnus-registry-max-entries', without consulting the entries' precious
status at all.

The `prune-needed' local variable also appears unused.

My understanding of the process is that the two functions should create
their two separate sets (entries over 90% of
`gnus-registry-max-entries', and non-precious entries), and then the
intersection of those two sets should be deleted.

Done this way, sorting would be cheaper as well -- you'd only need to
sort candidates by age for the hard-prune set.

I'm still pretty confused, but I can prepare a patch for this. Perhaps
I'm misreading the code, but I can't see how!

Eric




  reply	other threads:[~2014-10-24 20:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24 19:04 Eric Abrahamsen
2014-10-24 20:56 ` Eric Abrahamsen [this message]
2014-10-25 19:59   ` Eric Abrahamsen
2014-10-27 15:03 ` Ted Zlatanov
2014-10-27 19:15   ` Eric Abrahamsen
2014-10-28 18:04     ` Eric Abrahamsen
2014-11-07 23:56       ` Eric Abrahamsen
2014-11-08  0:01         ` Eric Abrahamsen
2014-11-08  8:39           ` Eric Abrahamsen
2014-11-10 13:54             ` Ted Zlatanov
2014-11-11  2:55               ` Eric Abrahamsen
2014-11-13 12:05               ` Eric Abrahamsen
2014-11-16  1:04                 ` Dan Christensen
2014-11-16  3:24                   ` Eric Abrahamsen
2014-12-18 10:07                 ` Ted Zlatanov
2014-12-18 15:00                   ` Eric Abrahamsen
2014-12-18 15:09                     ` Eric Abrahamsen
2014-12-19  0:44                       ` Katsumi Yamaoka
2014-12-19  2:08                         ` Eric Abrahamsen
2014-12-20  3:09                         ` Ted Zlatanov
2014-12-20 11:22                           ` Katsumi Yamaoka
2014-12-20 13:53                             ` Older Emacsen (was: [PATCH] Two issues with the gnus-registry) Ted Zlatanov
2014-12-19  1:30                       ` [PATCH] Two issues with the gnus-registry Ted Zlatanov
2014-10-28 20:10     ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppdhyynb.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).