From: Howard Chu Date: Sat, 24 Aug 2002 19:23:30 +0000 (+0000) Subject: Add debug if bdb_cache_entry_db_lock fails to get a lock X-Git-Tag: NO_SLAP_OP_BLOCKS~1180 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5d9479a3e82cc1ed5260f26878bf710a3b65faec;p=openldap Add debug if bdb_cache_entry_db_lock fails to get a lock to assist in diagnosing ITS#1986 --- diff --git a/servers/slapd/back-bdb/cache.c b/servers/slapd/back-bdb/cache.c index dcfa51c68e..961c047e2b 100644 --- a/servers/slapd/back-bdb/cache.c +++ b/servers/slapd/back-bdb/cache.c @@ -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; }