Gnus development mailing list
 help / color / mirror / Atom feed
* nnmaildir reports bogus number of articles
@ 2002-10-26 11:17 Peter Makholm
  2002-10-28 17:15 ` Paul Jarc
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Makholm @ 2002-10-26 11:17 UTC (permalink / raw)


After I updated my ognus a week ago my nnmaildir folders have begun to
report a pretty large number of available articles.

I got a folder with 2345 messages in it:

brother@mac:~/Mail/nnmaildir/linux.kernel$ ls cur | wc -l
   2345
brother@mac:~/Mail/nnmaildir/linux.kernel$ 

But gnus is reporting about 5000 unread messages each time i updates
and it says that there are about 7000 messages at total.

But looking arund in the folder I found the following:

brother@mac:~/Mail/nnmaildir/linux.kernel$ ls .nnmaildir/num/ | wc -l
   7171
brother@mac:~/Mail/nnmaildir/linux.kernel$ 

7171 hardlinks to the same empty file with no information in the
filname I can find any use of

brother@mac:~/Mail/nnmaildir/linux.kernel$ ls -l .nnmaildir/num/ | head 
total 0
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 1
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 10
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 100
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 1000
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 1001
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 1002
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 1003
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 1004
-rw-r--r--  7171 brother  users           0 Oct 26 12:57 1005
brother@mac:~/Mail/nnmaildir/linux.kernel$ 

All the other directories in .nnmaildir seems to have the same number
of files as the number of articles.


Is there a known fix for this problem?

-- 
 Peter Makholm     |    I congratulate you. Happy goldfish bowl to you, to
 peter@makholm.net |      me, to everyone, and may each of you fry in hell
 http://hacking.dk |                                               forever
                   |                                      -- The Dead Past



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: nnmaildir reports bogus number of articles
  2002-10-26 11:17 nnmaildir reports bogus number of articles Peter Makholm
@ 2002-10-28 17:15 ` Paul Jarc
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Jarc @ 2002-10-28 17:15 UTC (permalink / raw)


Peter Makholm <peter@makholm.net> wrote:
> But gnus is reporting about 5000 unread messages each time i updates
> and it says that there are about 7000 messages at total.

This is at least partly the same old problem that other mail backends
have always had, where Gnus ignores the number of messages reported by
the backend, and overestimates based on the lowest and highest article
numbers.  There seems to be more to it in the nnmaildir case, but I'm
not sure what the problem is yet.  nnmaildir seems to be reporting the
correct information to Gnus AFAICT.  I found some code in Gnus that
looks like it's incredibly buggy (see message
<m3zntvtb3c.fsf@multivac.cwru.edu>), but if it were, it would affect
all backends and probably would have been fixed already, so I'm
probably misunderstanding it.

> brother@mac:~/Mail/nnmaildir/linux.kernel$ ls .nnmaildir/num/ | wc -l
>    7171

That means the highest article number in this group is 7170.
(Actually, the way nnmaildir determines that is by stat()ing
".../num/:", but that should give the same result.)

> 7171 hardlinks to the same empty file with no information in the
> filname I can find any use of

nnmaildir allocates article numbers for new messages by making a link
named according to the number it's trying to allocate.  If that fails
with EEXIST, then the article number is already in use; otherwise, the
number we tried is now allocated.

> All the other directories in .nnmaildir seems to have the same number
> of files as the number of articles.

Right.  To ensure that we don't reuse article numbers, the num/* links
aren't supposed to be deleted.  Other files are deleted when an
article expires.

> Is there a known fix for this problem?

Not yet.  Josh Huber and I tried to debug it a while ago; see the
thread called "nnmaildir has persistent article numbers", or something
like that.


paul



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-28 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-26 11:17 nnmaildir reports bogus number of articles Peter Makholm
2002-10-28 17:15 ` Paul Jarc

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).