Hi again,
After a rather frustrating day and a half, I finally have everything set up
to develop. I committed a few updates mainly to ensure my PPP link was
working.
I'm still quite busy finishing up the search side of phrase searching.
Before I commit that, I wanted to make a few cleanups in
htcommon/WordList.cc which would improve performance.
Here's one. It offers a large performance improvement by only opening and
closing the database once. Right now it does an open/close every call to
Flush(), which is once per document, plus once per link.
I assumed this would work without problems... Nope. After about 30
documents, you get:
DB2 problem...: /opt/www/htdig/db/db.docdb: page 934415490 doesn't exist,
create flag not set
This message pops up every call to flush after it starts. I think the patch
uncovers something strange in our use of the Berkeley DB code. It may shed
some light on what's happening when this crops up on the document side as
well. Anyone else get the same problems with this patch?
-Geoff
Index: htcommon/WordList.cc
===================================================================
RCS file: /opt/htdig/cvs/htdig3/htcommon/WordList.cc,v
retrieving revision 1.21
diff -c -3 -p -r1.21 WordList.cc
*** htcommon/WordList.cc 1999/08/27 15:46:19 1.21
--- htcommon/WordList.cc 1999/08/27 15:58:09
*************** void WordList::Flush()
*** 148,162 ****
{
WordReference *wordRef;
WordRecord *wordRec = new WordRecord;
- Database *dbf = Database::getDatabaseInstance(DB_BTREE);
- char *wordfile = config["word_db"];
String compressedData;
String key;
! if (dbf->OpenReadWrite(wordfile, 0664) == NOTOK)
{
! // Need a useful error here, yet we're basically dead.
}
words->Start_Get();
--- 148,160 ----
{
WordReference *wordRef;
WordRecord *wordRec = new WordRecord;
String compressedData;
String key;
! if (!isopen)
{
! Open(config["word_db"]);
}
words->Start_Get();
*************** void WordList::Flush()
*** 186,193 ****
// Cleanup
delete wordRec;
words->Destroy();
- dbf->Close();
- delete dbf;
}
--- 184,189 ----
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.