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

Re: back-mdb notes

Hallvard B Furuseth wrote:
Howard Chu writes:
Unfortunately I realized that not all application-level caching can be
eliminated - with the hierarchical DB approach, we don't store full
entry DNs in the DB so they still need to be generated in main memory,
and they probably should be cached. But that's a detail to be
addressed later; it may well be that the cost of always constructing
them on the fly (no caching) is acceptable.

I previously complained that an mmapped database with no level of
caching in the code would collect the effects of bugs quite efficiently.
If some other module incorrectly modifies an entry in-memory when it
should have modified a private copy, the mod goes directly to the DB
even if nothing is doing an LDAP update operation.  Restarting slapd
does not clean up, slapcat/slapadd may not work either.  Is there
something in this design which fixes that?

Not at present.

You're just going to have to be very very careful about what modules you use...

Since the DB uses MVCC, that means that semantically all data in the DB can be considered read-only. We could use mprotect() to enforce that, but I'm not that far in the development of the mdb library yet and I have no idea how much overhead that will impose.
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/