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

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
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