[Date Prev][Date Next]
Re: (ITS#5086) back-bdb bug when add is used with snapshot isolation
We tested with snapshot isolation before and found no performance benefit. As
such, there's no point in undertaking the effort to fix this issue.
It's worth noting that with a properly configured cache, most read operations
are satisfied by the slapd entry cache, so the main point of lock contention
that snapshot isolation tries to solve never even occurs.
> Full_Name: Stelios Grigoriadis
> Version: 2.3.32
> OS: Linux, (SLES 10)
> URL: http://ninikos.freehostia.com/bdb_idl_cache_bug.tar.gz
> Submission from: (NULL) (188.8.131.52)
> When using slapd with the snapshot isolation level in DB (version 4.5.20)
> it is possible that added entries don't appear in subsequent searches.
> Scenario: A client is adding new information while at the same time another
> is initiating an LDAP search with the same searchbase as the "parent" of
> the added information.
> If the search is executed after the add operation has cleared the IDL-cache
> but before the changes has been committed, the added entries will not appear
> in any subsequent searches unless slapd is restarted.
> The problem is that, in the bdb_idl_insert_key-function, the key is deleted
> from the IDL-cache but the newly added keys in the database are not yet
> committed, so clients that re-read the information will not have those updated
> The solution would be to clear the relevant IDL-cache entries after the
> changes has been committed.
> This behaviour is demonstrated by the program cache_test_fork.c which is
> in bdb_idl_cache_bug.tar.gz along with the slapd configuration.
> I am currently working on the solution but would greatly appreciate any help
> from you as I am not nearly as familiar with the code as you are.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/