Torsten Neuer (email@example.com)
Thu, 1 Apr 1999 21:55:35 +0200
On Thu, 01 Apr 1999, Gilles Detillieux wrote:
>According to Torsten Neuer:
>> On Don, 01 Apr 1999, Geoff Hutchison wrote:
>> >I just wanted to report on some coding I've been working on. Following
>> >Gilles' suggestion, I started work on moving the excerpts into a separate
>> >db as an option. This should help speed a number of things by reducing
>> >overhead and cut down on disk transfers.
>> >However, the solution I'm using right now is to open the DB every time a
>> >DocHead method is called. It opens the DB read-only on an access and
>> >read-write on a modification. So far so good, except this requires a lot
>> >of calls to open and close the db on every method. (Remember, this is
>> >multiplied by *every* DocumentRef that accesses that field!)
>> >So an ideal situation would be a static invocation of the db. Then you
>> >open it once, close it once, etc.
>> >The problem comes with the two methods--one wants it read-only (e.g.
>> >htsearch) and the other wants it read-write. Maybe I'm missing something
>> >really obvious, but I don't know how you would ensure the variable is set
>> >properly for each method?
>> >Put another way, I only want htsearch to open it read-only (obvious
>> >reasons), but I want htdig to open it read-write (again obvious). But I
>> >don't know how I'd do this with a static variable...
>> Hmm.. file-locking? That way you can leave it open and just lock it
>> for reading/writing. Drawback: Two htsearch processes may not access
>> the db concurrently, although they're working read-only. They must,
>> however, lock during read access to stop the digger from modifying
>> the record that's been currently read - unless you're able to synchronize
>> the digger with the searcher processes.
>If the problem is file locking preventing simultaneous digging & searching
>(which is still to come if I understand correctly), wouldn't the same
>problem affect the docdb? I'm no expert on this, but shouldn't htsearch
>use this new docheaddb the same way it uses the docdb, or how it used to
>use the index db in 3.1? I don't understand the need to use a static
Static variables suck if it can be handled by operating system or
database functions. I'm not familiar enough with Berkeley DB to
tell exactly what to do in this case, but maybe it is worth having
a look at db/docs/ref/lock/stdmode.html in the htdig source tree.
-- InWise - Wirtschaftlich-Wissenschaftlicher Internet Service GmbH Waldhofstraße 14 Tel: +49-4101-403605 D-25474 Ellerbek Fax: +49-4101-403606 E-Mail: firstname.lastname@example.org Internet: http://www.inwise.de
------------------------------------ To unsubscribe from the htdig3-dev mailing list, send a message to email@example.com containing the single word "unsubscribe" in the SUBJECT of the message.
This archive was generated by hypermail 2.0b3 on Thu Apr 01 1999 - 12:28:14 PST