makehistory takes a long time on latest CVS
Katsuhiro Kondou
kondou at nec.co.jp
Sun Aug 6 23:01:06 UTC 2000
In article <200008042317.e74NHdC01247 at vulpine.ao.net>,
Dan Merillat <harik at chaos.ao.net> wrote;
} I think (but am not positive) that buffindexed is taking the time,
} because if I run it in 'fork and flush' mode, it always overruns my
} available /tmp space.... getting unsorted overview data faster then it
} can store it.
}
} aug 4 CVS snapshot.
}
} Ideas on where to look?
How about attached which is not tested yet, but should work.
Overview data does not need to be sorted for buffindexed, and
this patch makes makehistory write overview data at the same
time while history is written.
--
Katsuhiro Kondou
--- expire/makehistory.c.orig Sat Jul 15 15:41:54 2000
+++ expire/makehistory.c Mon Aug 7 07:47:52 2000
@@ -349,7 +349,19 @@
{
char temp[SMBUF];
char *p, *q, *r;
+ int i;
+ if (sorttype == OVNOSORT) {
+ if (!OVadd(*token, overdata, overlen, arrived, expires)) {
+ if (OVctl(OVSPACE, (void *)&i) && i == OV_NOSPACE) {
+ fprintf(stderr, "makehistory: no space left for overview\n");
+ OVclose();
+ exit(1);
+ }
+ fprintf(stderr, "makehistory: Can't write overview data for article \"%s\"\n", TokenToText(*token));
+ }
+ return;
+ }
if (OverTmpPath == NULL) {
/* need new temp file, so create it. */
(void)sprintf(temp, "%s/histXXXXXX", TmpDir);
@@ -879,7 +891,7 @@
/* Read in the overview schema */
ARTreadschema(DoOverview);
- if (DoOverview && !Fork) {
+ if (DoOverview) {
/* init the overview setup. */
if (!OVopen(OV_WRITE)) {
fprintf(stderr, "makehistory: OVopen failed\n");
@@ -889,11 +901,19 @@
fprintf(stderr, "makehistory: OVctl(OVSORT) failed\n");
exit(1);
}
- if (!OVctl(OVCUTOFFLOW, (void *)&Cutofflow)) {
- fprintf(stderr, "makehistory: OVctl(OVCUTOFFLOW) failed\n");
- exit(1);
+ if (!Fork) {
+ if (!OVctl(OVCUTOFFLOW, (void *)&Cutofflow)) {
+ fprintf(stderr, "makehistory: OVctl(OVCUTOFFLOW) failed\n");
+ exit(1);
+ }
+ OverAddAllNewsgroups();
+ } else {
+ if (sorttype == OVNOSORT) {
+ fprintf(stderr, "makehistory: '-F' is not available for this overview method\n");
+ exit(1);
+ }
+ OVclose();
}
- OverAddAllNewsgroups();
}
/* Init the Storage Manager */
@@ -944,7 +964,7 @@
}
}
- if (DoOverview) {
+ if (DoOverview && (sorttype != OVNOSORT)) {
int status;
FlushOverTmpFile();
if(Fork)
--- include/ov.h.orig Mon May 22 06:11:57 2000
+++ include/ov.h Mon Aug 7 07:21:48 2000
@@ -12,7 +12,7 @@
typedef enum {OVSPACE, OVSORT, OVCUTOFFLOW, OVGROUPBASEDEXPIRE, OVSTATICSEARCH} OVCTLTYPE;
#define OV_NOSPACE 100
-typedef enum {OVNEWSGROUP, OVARRIVED} OVSORTTYPE;
+typedef enum {OVNEWSGROUP, OVARRIVED, OVNOSORT} OVSORTTYPE;
typedef struct _OVGE {
BOOL delayrm; /* append tokens to filename if true */
--- storage/buffindexed/buffindexed.c.orig Mon May 22 06:11:58 2000
+++ storage/buffindexed/buffindexed.c Mon Aug 7 07:22:24 2000
@@ -1899,7 +1899,7 @@
return TRUE;
case OVSORT:
sorttype = (OVSORTTYPE *)val;
- *sorttype = OVARRIVED;
+ *sorttype = OVNOSORT;
return TRUE;
case OVCUTOFFLOW:
Cutofflow = *(BOOL *)val;
More information about the inn-workers
mailing list