dbz/tagged hash stability concerns

Sang-yong Suh sysuh at kigam.re.kr
Thu Mar 15 09:33:46 UTC 2001


In article <E14cnds.00042H.00 at g212.hadiko.de> you write:
>Recently I had to rebuild the history, which at that time already had
>accumulated quite a few dupes. Unfortunately makehistory has no option

The duplicates are generated by expire.  Unlike his.c in innd
expire.c does not flushes the newly written history lines on to
the new history text file before it is checking any duplicates.
Note that untagged-hash dbz does not references the history text
file to check any duplicates.  That's why untagged-hash had
no such problem.

The expire.c bug results the duplicates, if once created, will not
be removed. Also, dbz.c in inn-2.3.1 had a slight problem and
causes duplicates at add-history-stage at the end of the expire run.
inn-stable(inn-2.3.2) fixes dbz.c only and not expire.c.

Because I have not subscribed inn-workers quite a long time,
and there's no such discussion recently, I thought that this bug is
already resolved without the source code upgrade.  However, your
posting and the follow-up indicated the bug is still pending...

The following one-line patch corrects the problem.
Hope that it helps,
--
sysuh

% cat expire-duplicate-id.patch
--- expire/expire.c.orig	Mon Feb 19 20:59:25 2001
+++ expire/expire.c	Mon Feb 19 20:45:19 2001
@@ -637,7 +637,7 @@
     if (out == NULL)
 	return TRUE;
 
-    if (ferror(out)) {
+    if (ferror(out) || fflush(out) == EOF) {
 	(void)fprintf(stderr, "Can't write new history, %s\n",
 		strerror(errno));
 	return FALSE;


More information about the inn-workers mailing list