bug? history getting bigger
George Lindholm
George.Lindholm at ubc.ca
Fri Aug 20 22:56:46 UTC 1999
I've been noticing that my history file kept getting bigger and bigger
and that the expirerm process kept taking long and longer to run. After
last
nights run I started to poke around a bit after I noticed that the
expire.list file contained 6.1M articles (out of a possible 8.5M),
most of them no longer on my system.
After looking at expire a bit it seemed to me that there was
some code missing that marked the expired articles as having been
expired. I came up with this patch which after a quick test seemed to
do what I expected it to. Am I missing something somewhere else that
I'm not doing that might explain my observations?
George
--
George.Lindholm at ubc.ca ITServices, UBC
Programmer/Analyst
phone: 604.822.4375 fax: 604.822.5116
-- Attached file included as plaintext by Listar --
-- File: expi
*** expire/expire.c 1999/08/20 21:47:09 1.1
--- expire/expire.c 1999/08/20 22:09:08
***************
*** 662,682 ****
} else {
kr = EXPkeepit(token, when, Expires);
if (kr == Remove) {
! EXPremove(token, &size, FALSE);
! }
! if (out) {
where = Offset;
(void)fprintf(out, "%s%c%s%c%s\n",
fields[0], HIS_FIELDSEP, fields[1], HIS_FIELDSEP,
TokenToText(token));
! Offset += strlen(fields[0]) + 1 + strlen(fields[1]) + 1
! + strlen(TokenToText(token)) + 1;
if (EXPverbose > 3)
! (void)printf("remember article: %s%c%s%c%s\n",
! fields[0], HIS_FIELDSEP, fields[1], HIS_FIELDSEP,
! TokenToText(token));
EXPstillhere++;
}
}
}
--- 662,694 ----
} else {
kr = EXPkeepit(token, when, Expires);
if (kr == Remove) {
! EXPremove(token, &size, FALSE);
!
! if (out) {
! where = Offset;
! (void)fprintf(out, "%s%c%s\n",
! fields[0], HIS_FIELDSEP, fields[1]);
! Offset += strlen(fields[0]) + 1 + strlen(fields[1]) + 1
! + strlen(TokenToText(token)) + 1;
! if (EXPverbose > 3)
! (void)printf("remembering article: %s%c%s\n",
! fields[0], HIS_FIELDSEP, fields[1]);
! EXPallgone++;
! }
! } else {
! if (out) {
where = Offset;
(void)fprintf(out, "%s%c%s%c%s\n",
fields[0], HIS_FIELDSEP, fields[1], HIS_FIELDSEP,
TokenToText(token));
! Offset += strlen(fields[0]) + 1 + strlen(fields[1]) + 1;
if (EXPverbose > 3)
! (void)printf("keeping article: %s%c%s%c%s\n",
! fields[0], HIS_FIELDSEP, fields[1], HIS_FIELDSEP,
! TokenToText(token));
EXPstillhere++;
+ }
}
}
}
More information about the inn-workers
mailing list