[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: search blocks modify -- why?



> -----Original Message-----
> From: Allan Streib [mailto:astreib@garp.ucs.indiana.edu]On Behalf Of Allan
Streib

> On Thu, 17 Apr 2003, Howard Chu wrote:
> > > Does search by default put the equivalent of a read lock
> on the file,
> > > which could block a modify while the search runs?
> >
> > Yes.

> And would dbnolocking avoid this?

No.

> If I serialize all updates

You have no way to guarantee this outside of slapd.

> do I have any need for locking?

back-ldbm in OpenLDAP 2.0 needs all that locking just to prevent itself from
self-destructing. Most of the back-ldbm indexing bugs have been fixed in
OpenLDAP 2.1 but we're still not certain that it's 100% clean. As such, those
locks are still present in 2.1 because we don't believe it's safe to use
otherwise. This is the price you pay for using back-ldbm; this is one reason
why back-bdb in 2.1 was written in the first place - to allow enhanced
concurrency.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support