From d8039728ee97b43868996eda12a3384c52e1b6634fc2dd108c03f99e8e6afb03 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Nov 2008 15:29:53 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openldap2?expand=0&rev=44 --- openldap2-client.changes | 8 +++++ openldap2-client.spec | 10 ++++-- openldap2.changes | 8 +++++ openldap2.spec | 10 ++++-- slapadd-no-trickle.dif | 76 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 slapadd-no-trickle.dif diff --git a/openldap2-client.changes b/openldap2-client.changes index 7c549d5..8700ca1 100644 --- a/openldap2-client.changes +++ b/openldap2-client.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Nov 28 14:08:16 CET 2008 - rhafer@suse.de + +- Disable the slapadd trickle-task it cause performance issues + when using libdb-4.5 (bnc#449641) +- removed obsolete configure option (ldbm backend does not exist + in OpenLDAP 2.4) + ------------------------------------------------------------------- Fri Nov 21 16:39:20 CET 2008 - ro@suse.de diff --git a/openldap2-client.spec b/openldap2-client.spec index 2de8a80..bafe025 100644 --- a/openldap2-client.spec +++ b/openldap2-client.spec @@ -27,7 +27,7 @@ BuildRequires: -pwdutils BuildRequires: -db-devel -pwdutils libdb-4_5-devel %endif Version: 2.4.12 -Release: 4 +Release: 5 Url: http://www.openldap.org License: BSD 3-Clause %if "%{name}" == "openldap2" @@ -67,6 +67,7 @@ Patch16: slapd-privdb-config-its5736.dif Patch17: slapo-chain-dangling-its5742.dif Patch18: slapd-db-close-error-its5745.dif Patch19: slapo-syncprov-skip-its5709.dif +Patch20: slapadd-no-trickle.dif Patch100: openldap-2.3.37.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -175,6 +176,7 @@ Authors: %patch17 %patch18 %patch19 +%patch20 -p1 cp %{SOURCE5} . cd ../openldap-2.3.37 %patch100 @@ -205,7 +207,6 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED -DLDAP_CONN --enable-aci \ --enable-bdb \ --enable-hdb \ - --enable-ldbm \ --enable-rewrite \ --enable-ldap=yes \ --enable-meta=mod \ @@ -537,6 +538,11 @@ fi %endif %changelog +* Fri Nov 28 2008 rhafer@suse.de +- Disable the slapadd trickle-task it cause performance issues + when using libdb-4.5 (bnc#449641) +- removed obsolete configure option (ldbm backend does not exist + in OpenLDAP 2.4) * Fri Nov 21 2008 ro@suse.de - update check-build.sh * Wed Nov 05 2008 rhafer@suse.de diff --git a/openldap2.changes b/openldap2.changes index 7c549d5..8700ca1 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Nov 28 14:08:16 CET 2008 - rhafer@suse.de + +- Disable the slapadd trickle-task it cause performance issues + when using libdb-4.5 (bnc#449641) +- removed obsolete configure option (ldbm backend does not exist + in OpenLDAP 2.4) + ------------------------------------------------------------------- Fri Nov 21 16:39:20 CET 2008 - ro@suse.de diff --git a/openldap2.spec b/openldap2.spec index c6534ea..223f535 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -27,7 +27,7 @@ BuildRequires: -pwdutils BuildRequires: -db-devel -pwdutils libdb-4_5-devel %endif Version: 2.4.12 -Release: 4 +Release: 5 Url: http://www.openldap.org License: BSD 3-Clause; openldap 2.8 %if "%{name}" == "openldap2" @@ -67,6 +67,7 @@ Patch16: slapd-privdb-config-its5736.dif Patch17: slapo-chain-dangling-its5742.dif Patch18: slapd-db-close-error-its5745.dif Patch19: slapo-syncprov-skip-its5709.dif +Patch20: slapadd-no-trickle.dif Patch100: openldap-2.3.37.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -178,6 +179,7 @@ Authors: %patch17 %patch18 %patch19 +%patch20 -p1 cp %{SOURCE5} . cd ../openldap-2.3.37 %patch100 @@ -208,7 +210,6 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED -DLDAP_CONN --enable-aci \ --enable-bdb \ --enable-hdb \ - --enable-ldbm \ --enable-rewrite \ --enable-ldap=yes \ --enable-meta=mod \ @@ -540,6 +541,11 @@ fi %endif %changelog +* Fri Nov 28 2008 rhafer@suse.de +- Disable the slapadd trickle-task it cause performance issues + when using libdb-4.5 (bnc#449641) +- removed obsolete configure option (ldbm backend does not exist + in OpenLDAP 2.4) * Fri Nov 21 2008 ro@suse.de - update check-build.sh * Wed Nov 05 2008 rhafer@suse.de diff --git a/slapadd-no-trickle.dif b/slapadd-no-trickle.dif new file mode 100644 index 0000000..5b5945b --- /dev/null +++ b/slapadd-no-trickle.dif @@ -0,0 +1,76 @@ +Index: openldap-2.4.12/servers/slapd/back-bdb/tools.c +=================================================================== +--- openldap-2.4.12.orig/servers/slapd/back-bdb/tools.c ++++ openldap-2.4.12/servers/slapd/back-bdb/tools.c +@@ -75,11 +75,7 @@ static ldap_pvt_thread_mutex_t bdb_tool_ + static ldap_pvt_thread_cond_t bdb_tool_index_cond_main; + static ldap_pvt_thread_cond_t bdb_tool_index_cond_work; + +-static ldap_pvt_thread_mutex_t bdb_tool_trickle_mutex; +-static ldap_pvt_thread_cond_t bdb_tool_trickle_cond; +- + static void * bdb_tool_index_task( void *ctx, void *ptr ); +-static void * bdb_tool_trickle_task( void *ctx, void *ptr ); + + int bdb_tool_entry_open( + BackendDB *be, int mode ) +@@ -106,10 +102,6 @@ int bdb_tool_entry_open( + /* Set up for threaded slapindex */ + if (( slapMode & (SLAP_TOOL_QUICK|SLAP_TOOL_READONLY)) == SLAP_TOOL_QUICK ) { + if ( !bdb_tool_info ) { +- ldap_pvt_thread_mutex_init( &bdb_tool_trickle_mutex ); +- ldap_pvt_thread_cond_init( &bdb_tool_trickle_cond ); +- ldap_pvt_thread_pool_submit( &connection_pool, bdb_tool_trickle_task, bdb->bi_dbenv ); +- + ldap_pvt_thread_mutex_init( &bdb_tool_index_mutex ); + ldap_pvt_thread_cond_init( &bdb_tool_index_cond_main ); + ldap_pvt_thread_cond_init( &bdb_tool_index_cond_work ); +@@ -137,9 +129,6 @@ int bdb_tool_entry_close( + { + if ( bdb_tool_info ) { + slapd_shutdown = 1; +- ldap_pvt_thread_mutex_lock( &bdb_tool_trickle_mutex ); +- ldap_pvt_thread_cond_signal( &bdb_tool_trickle_cond ); +- ldap_pvt_thread_mutex_unlock( &bdb_tool_trickle_mutex ); + ldap_pvt_thread_mutex_lock( &bdb_tool_index_mutex ); + bdb_tool_index_tcount = slap_tool_thread_max - 1; + ldap_pvt_thread_cond_broadcast( &bdb_tool_index_cond_work ); +@@ -522,12 +511,6 @@ ID bdb_tool_entry_put( + goto done; + } + +- if (( slapMode & SLAP_TOOL_QUICK ) && (( e->e_id & 0xfff ) == 0xfff )) { +- ldap_pvt_thread_mutex_lock( &bdb_tool_trickle_mutex ); +- ldap_pvt_thread_cond_signal( &bdb_tool_trickle_cond ); +- ldap_pvt_thread_mutex_unlock( &bdb_tool_trickle_mutex ); +- } +- + if ( !bdb->bi_linear_index ) + rc = bdb_tool_index_add( &op, tid, e ); + if( rc != 0 ) { +@@ -1100,25 +1083,6 @@ int bdb_tool_idl_add( + #endif + + static void * +-bdb_tool_trickle_task( void *ctx, void *ptr ) +-{ +- DB_ENV *env = ptr; +- int wrote; +- +- ldap_pvt_thread_mutex_lock( &bdb_tool_trickle_mutex ); +- while ( 1 ) { +- ldap_pvt_thread_cond_wait( &bdb_tool_trickle_cond, +- &bdb_tool_trickle_mutex ); +- if ( slapd_shutdown ) +- break; +- env->memp_trickle( env, 30, &wrote ); +- } +- ldap_pvt_thread_mutex_unlock( &bdb_tool_trickle_mutex ); +- +- return NULL; +-} +- +-static void * + bdb_tool_index_task( void *ctx, void *ptr ) + { + int base = *(int *)ptr;