diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2008-11-11 21:31:41 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2008-11-11 21:31:41 +0000 |
commit | c8f081f0a94c492198e3590bb7f5d187e9fc79f7 (patch) | |
tree | ea10404b5073cbf84bcad95b1d295efcd8e87f94 /ldap/servers/slapd | |
parent | 4d128545bb01ea626a79faa6a60152ca277ce05d (diff) | |
download | ds-c8f081f0a94c492198e3590bb7f5d187e9fc79f7.tar.gz ds-c8f081f0a94c492198e3590bb7f5d187e9fc79f7.tar.xz ds-c8f081f0a94c492198e3590bb7f5d187e9fc79f7.zip |
Resolves: #207457
Summary: (64bitcounters) rhds 7.1 - server stats use 32-bit integers - entrycachehitratio 1503%
Description: additional fix for #207457; e->ep_refcnt should have been
protected by cache->c_mutex, otherwise it breaks the lru list under the stress.
Diffstat (limited to 'ldap/servers/slapd')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ldap/servers/slapd/back-ldbm/cache.c b/ldap/servers/slapd/back-ldbm/cache.c index 38ca6aab..8c5e6912 100644 --- a/ldap/servers/slapd/back-ldbm/cache.c +++ b/ldap/servers/slapd/back-ldbm/cache.c @@ -938,8 +938,8 @@ struct backentry *cache_find_dn(struct cache *cache, const char *dn, unsigned lo } if (e->ep_refcnt == 0) lru_delete(cache, e); - PR_Unlock(cache->c_mutex); e->ep_refcnt++; + PR_Unlock(cache->c_mutex); slapi_counter_increment(cache->c_hits); } else { PR_Unlock(cache->c_mutex); @@ -969,8 +969,8 @@ struct backentry *cache_find_id(struct cache *cache, ID id) } if (e->ep_refcnt == 0) lru_delete(cache, e); - PR_Unlock(cache->c_mutex); e->ep_refcnt++; + PR_Unlock(cache->c_mutex); slapi_counter_increment(cache->c_hits); } else { PR_Unlock(cache->c_mutex); @@ -1000,8 +1000,8 @@ struct backentry *cache_find_uuid(struct cache *cache, const char *uuid) } if (e->ep_refcnt == 0) lru_delete(cache, e); - PR_Unlock(cache->c_mutex); e->ep_refcnt++; + PR_Unlock(cache->c_mutex); slapi_counter_increment(cache->c_hits); } else { PR_Unlock(cache->c_mutex); |