Article View: news.software.nntp
Article #81459No Ill Effects - was Re: [PATCH] Regarding overview creation and the active file.
From: D. Stussy
Date: Tue, 23 Jun 2009 00:05
Date: Tue, 23 Jun 2009 00:05
109 lines
5691 bytes
5691 bytes
"D. Stussy" <spam@bde-arc.ampr.org> wrote in message
news:h1gpnn$eio$1@snarked.org...
> Better patch - found the problem with group expiry creating the skipped
> groups. Note the addition of the final section.
>
> DIRECTORY: storage/tradindexed/
> diff -u tdx-data.c*
> --- tdx-data.c 2009-05-21 20:08:33.000000000 +0000
> +++ tdx-data.c.mod 2009-06-19 11:00:14.000000000 +0000
> @@ -1055,10 +1055,12 @@
>
> /* Check the inode of the index. */
> if (data->indexinode != index->indexinode) {
> - warn("tradindexed: index inode mismatch for %s: %lu != %lu",
> group,
> - (unsigned long) data->indexinode,
> - (unsigned long) index->indexinode);
> - if (fix) {
> + if (index->indexinode) {
> + warn("tradindexed: index inode mismatch for %s: %lu != %lu",
> group,
> + (unsigned long) data->indexinode,
> + (unsigned long) index->indexinode);
> + }
> + if (fix || !index->indexinode) {
> index->indexinode = data->indexinode;
> changed = true;
> }
> diff -u tdx-group.c*
> --- tdx-group.c 2009-05-21 20:08:33.000000000 +0000
> +++ tdx-group.c.mod 2009-06-19 11:05:13.000000000 +0000
> @@ -658,10 +658,12 @@
> entry->count = 0;
> entry->flag = *flag;
> data = tdx_data_new(group, index->writable);
> - if (!tdx_data_open_files(data))
> - warn("tradindexed: unable to create data files for %s", group);
> - entry->indexinode = data->indexinode;
> - tdx_data_close(data);
> + if (strchr("=xj",*flag) == NULL) {
> + if (!tdx_data_open_files(data))
> + warn("tradindexed: unable to create data files for %s",
> group);
> + entry->indexinode = data->indexinode;
> + tdx_data_close(data);
> + }
> index_add(index, entry);
>
> index_lock(index->fd, INN_LOCK_UNLOCK);
> @@ -765,8 +767,10 @@
> index_lock_group(index->fd, offset, INN_LOCK_UNLOCK);
> goto fail;
> }
> - if (entry->indexinode != data->indexinode)
> - warn("tradindexed: index inode mismatch for %s", group);
> + if (entry->indexinode != data->indexinode) {
> + if (!entry->indexinode) entry->indexinode =
data->indexinode;
> + else warn("tradindexed: index inode mismatch for %s",
group);
> + }
> high = entry->high;
> base = entry->base;
> index_lock_group(index->fd, offset, INN_LOCK_UNLOCK);
> @@ -805,9 +809,11 @@
> if (entry->indexinode != data->indexinode) {
> if (!tdx_data_open_files(data))
> goto fail;
> - if (entry->indexinode != data->indexinode)
> - warn("tradindexed: index inode mismatch for %s",
> + if (entry->indexinode != data->indexinode) {
> + if (!entry->indexinode) entry->indexinode =
data->indexinode;
> + else warn("tradindexed: index inode mismatch for %s",
> HashToText(entry->hash));
> + }
> data->base = entry->base;
> }
>
> @@ -919,6 +925,10 @@
> tdx_index_close(index);
> return false;
> }
> +
> + if (!entry->indexinode) return true;
> + /* Since there was no inode for this group, there was nothing to do!
> */
> +
> tdx_index_rebuild_start(index, entry);
>
> /* tdx_data_expire_start builds the new IDX and DAT files and fills
in the
After 5 days of running with this patch, I have noticed no ill effects
whatsoever and it seems to work as expected. Traditional overview files
are not created for "j", "x", or "=" unless they are needed because the
groups are not empty. I have noted no problems with nnrpd either.
Upon review of the code for NNRPD, I note that when it generates a listing
for a user (e.g. "LIST ACTIVE"), alias groups ("=") are excluded and "j"
and "x" groups are returned as if they were actually marked with "n". That
is acceptable in that if groups so marked are not empty, they should be
readable. However, perhaps they should be skipped if they are empty
(lowmark == highmark+1) and not presented as moderation status flagged with
"n"?
Comments?
Technical Details
Message-ID:
<h1p68n$vib$1@snarked.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.musoftware.de!wum.musoftware.de!de-l.enfer-du-nord.net!feeder.news-service.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news-in-02.newsfeed.easynews.com!easynews.com!easynews!news.he.net!news.snarked.org!not-for-mailReferences:
<h16rde$stb$1@snarked.org> <87hbyhx90e.fsf@windlord.stanford.edu> <h1fuea$b2d$1@snarked.org> <h1gpnn$eio$1@snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <h1p68n$vib$1@snarked.org> Subject: No Ill Effects - was Re: [PATCH] Regarding overview creation and the active file. Date: Mon, 22 Jun 2009 17:05:44 -0700 From: "D. Stussy" <spam@bde-arc.ampr.org> References: <h16rde$stb$1@snarked.org> <87hbyhx90e.fsf@windlord.stanford.edu> <h1fuea$b2d$1@snarked.org> <h1gpnn$eio$1@snarked.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news.musoftware.de!wum.musoftware.de!de-l.enfer-du-nord.net!feeder.news-service.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news-in-02.newsfeed.easynews.com!easynews.com!easynews!news.he.net!news.snarked.org!not-for-mail Newsgroups: news.software.nntp Lines: 109 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> NNTP-Posting-Host: pool-71-118-50-95.lsanca.dsl-w.verizon.net X-Trace: snarked.org 1245715543 32331 71.118.50.95 (23 Jun 2009 00:05:43 GMT) X-Complaints-To: newsmaster@snarked.org NNTP-Posting-Date: Tue, 23 Jun 2009 00:05:43 +0000 (UTC) X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478