]> git.sur5r.net Git - openldap/commitdiff
Add debug if bdb_cache_entry_db_lock fails to get a lock
authorHoward Chu <hyc@openldap.org>
Sat, 24 Aug 2002 19:23:30 +0000 (19:23 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 24 Aug 2002 19:23:30 +0000 (19:23 +0000)
to assist in diagnosing ITS#1986

servers/slapd/back-bdb/cache.c

index dcfa51c68e5dd63db08d195fe32799dd55594913..961c047e2bf5bac87f9a6ca3987c265196f22dc0 100644 (file)
@@ -149,6 +149,17 @@ bdb_cache_entry_db_lock
        lockobj.size = e->e_nname.bv_len;
        rc = LOCK_GET(env, locker, flags | DB_LOCK_NOWAIT,
                                        &lockobj, db_rw, lock);
+       if (rc) {
+#ifdef NEW_LOGGING
+               LDAP_LOG( CACHE, DETAIL1, 
+                       "bdb_cache_entry_db_lock: entry %s, rw %d, rc %d\n",
+                       e->e_nname.bv_val, rw, rc );
+#else
+               Debug( LDAP_DEBUG_TRACE,
+                       "bdb_cache_entry_db_lock: entry %s, rw %d, rc %d\n",
+                       e->e_nname.bv_val, rw, rc );
+#endif
+       }
        return rc;
 }