🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #19747

Re: Cancel Patches?

#19747
From: Sang-yong Suh
Date: Mon, 28 Jul 1997 00:00
47 lines
2242 bytes
In article <5rgrrn$o49$1@mars.njcc.com>,
Brian Kramer <bjkramer@pluto.njcc.com> wrote:
>Are there any patches or suggestions of ways to deal with the huge # of
>cancel messages?

If you are not feeding significant amount of articles to other servers,
you can delete the old cancel messages, i.e., keeping the total number
of cancel messages in your spool.  For me, I am using innfeed to
transfer the cancel messages of the local user to my feeders.
Therefore, I don't need to keep all such a huge number of cancel
messages, which slowed down the news server performacne.

The following patch will keep the number of cancel messages by 8,000
which I think is sufficiently big enough for a leaf site.
It is relative to inn-1.6b2.

Hope this helps,
--
Sang-yong Suh

--- innd/art.c.orig	Mon Jul 28 10:44:51 1997
+++ innd/art.c	Mon Jul 28 10:52:41 1997
@@ -2691,6 +2691,20 @@
 	}
     }
 
+#define MAXCANCELS 8000
+#ifdef	MAXCANCELS
+    /* keep size of the cancel directory managable by deleting olds */
+    if (ControlHeader >= 0 && Accepted && !ToGroup &&
+	strcmp(ControlWord, "cancel") == 0) {
+	if ((ngp = NGfind("control.cancel")) == NULL)
+	    ngp = NGfind(ARTctl);
+	if (ngp->Filenum - MAXCANCELS > 0) {
+	    (void)sprintf(buff, "%s/%lu", ngp->Dir, ngp->Filenum-MAXCANCELS);
+	    unlink(buff);
+	}
+    }
+#endif	/* MAXCANCELS */
+
     /* Update history if we didn't get too many I/O errors above. */
     if (Mode != OMrunning || !HISwrite(&Data, Files.Data)) {
 	i = errno;


Technical Details
Message-ID: <5rhb55$u48$1@news.kigam.re.kr>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <5rgrrn$o49$1@mars.njcc.com>

Show Full Headers
Complete Article Headers
Message-ID: <5rhb55$u48$1@news.kigam.re.kr>
Subject: Re: Cancel Patches?
Date: Mon, 28 Jul 1997 00:00:00 +0000
From: sysuh@kigam.re.kr (Sang-yong Suh)
References: <5rgrrn$o49$1@mars.njcc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 259655177
Sender: sysuh@news.kigam.re.kr
X-Complaints-To: usenet@news.kigam.re.kr
X-Trace: news.kigam.re.kr 870068198 30857 (None) 134.75.144.204
Organization: Korea Inst Geology Mining & Materials
Reply-To: sysuh@kigam.re.kr
Newsgroups: news.software.nntp