]> git.sur5r.net Git - openldap/commitdiff
Change cache.c assert logic based on Hallvard's suggestion.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 10 Dec 1998 19:20:15 +0000 (19:20 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 10 Dec 1998 19:20:15 +0000 (19:20 +0000)
  "Check that the entry has no writers before removing it from the
  cache" sounds more sensible to me than "check that it *has* writers"
  before removing it.
I've also changed the default cachesize for tests to 4.  This
should help discover such problems.

servers/slapd/back-ldbm/cache.c
tests/data/slapd-master.conf

index 1674432d69d37b94d78bc80d4290c17e22617a62..1ab9896cca3f59f32e8b2951a5ef23a9f7335b77 100644 (file)
@@ -200,7 +200,7 @@ cache_add_entry_lock(
 
                        /* XXX check for writer lock - should also check no readers pending */
 #ifdef LDAP_DEBUG
-                       assert(pthread_rdwr_wchk_np(&e->e_rdwr));
+                       assert(!pthread_rdwr_rwchk_np(&e->e_rdwr));
 #endif
 
                        /* delete from cache and lru q */
index 2b936ab605f9f3fb83ae7dac84c95e2b39051551..59657b7444f7f5e0ec234f90910f10fd7af304cc 100644 (file)
@@ -10,6 +10,7 @@ schemacheck   off
 #######################################################################
 
 database       ldbm
+cachesize      4
 suffix         "o=University of Michigan, c=US"
 directory      ./test-db
 rootdn         "cn=Manager, o=University of Michigan, c=US"