diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-11-18 19:09:26 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-11-20 11:18:50 -0500 |
commit | 7c7de044bb08aa6b5c9f32c000c3b97a3c55ca31 (patch) | |
tree | 9131e9a87fda825a2a4502e026f3eb5153af592a /server/providers/ldap/ldap_common.h | |
parent | c35c2e840a5f97ebe4c1dd5a5b82745c34217320 (diff) | |
download | sssd-7c7de044bb08aa6b5c9f32c000c3b97a3c55ca31.tar.gz sssd-7c7de044bb08aa6b5c9f32c000c3b97a3c55ca31.tar.bz2 sssd-7c7de044bb08aa6b5c9f32c000c3b97a3c55ca31.zip |
Better behavior on cleanup
With the previous code in domains with many users and enumeration enable we
would eventually end up making thousands of individual searches for entries in
the clean-up process.
Change the code to do a full enumeration before a cleanup so we do one single
big search to update all entries and only then search for entries to purge.
This also fixes the fact that the cleanup task was running at every enumeration
instead of running every "ldap_purge_cache_timeout" seconds.
Diffstat (limited to 'server/providers/ldap/ldap_common.h')
-rw-r--r-- | server/providers/ldap/ldap_common.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/providers/ldap/ldap_common.h b/server/providers/ldap/ldap_common.h index 9cc30f84..96b332cf 100644 --- a/server/providers/ldap/ldap_common.h +++ b/server/providers/ldap/ldap_common.h @@ -37,7 +37,9 @@ struct sdap_id_ctx { struct sdap_handle *gsh; /* enumeration loop timer */ - struct timeval last_run; + struct timeval last_enum; + /* cleanup loop timer */ + struct timeval last_purge; char *max_user_timestamp; char *max_group_timestamp; |