On Don, 01 Apr 1999, Geoff Hutchison wrote:
>Hi,
>
>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.


just my 2 cc,
  Torsten

--
InWise - Wirtschaftlich-Wissenschaftlicher Internet Service GmbH
Waldhofstra�e 14                            Tel: +49-4101-403605
D-25474 Ellerbek                            Fax: +49-4101-403606
E-Mail: [EMAIL PROTECTED]            Internet: http://www.inwise.de

------------------------------------
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.

Reply via email to