Change to renumbering

Russ Allbery rra at stanford.edu
Mon Oct 20 01:18:04 UTC 2003


I've just applied the following patch to both CURRENT and STABLE.  The
effect is to prevent renumbering from ever decreasing the high article
number for a group.  This should mean that even in the case of the
overview data not accurately reflecting what's on disk, innd still won't
assign duplicate article numbers unless the active file is also out of
date.

This should further lower the window where one can get the "file already
exists" errors out of tradspool, although not eliminate it entirely since
we don't flush everything after every article write.

--- ng.c        2003/01/19 22:56:32     1.34
+++ ng.c        2003/10/20 01:11:50
@@ -365,7 +365,7 @@ NGrenumber(NEWSGROUP *ngp)
        himark = high;
     }
     l = atol(f2);
-    if (himark != l) {
+    if (himark > l) {
        syslog(L_NOTICE, RENUMBER, LogName, ngp->Name, "hi", l, himark);
        if (!FormatLong(f2, himark, f3 - f2 - 1)) {
            syslog(L_ERROR, NORENUMBER, LogName, ngp->Name, "hi");
@@ -373,6 +373,9 @@ NGrenumber(NEWSGROUP *ngp)
        }
        ngp->Last = himark;
        ICDactivedirty++;
+    } else if (himark < l) {
+        syslog(L_NOTICE, "%s renumber %s hi not decreasing %ld to %ld",
+               LogName, ngp->Name, l, himark);
     }
     l = atol(f3);
     if (lomark != l) {

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>


More information about the inn-workers mailing list