Przeglądaj źródła

Ticket 47618 - Enable normalized DN cache by default

Enable the normalized DN cache by default as there is a performance boost,
especially with roles.  Enable cache for upgrades as well.

https://fedorahosted.org/389/ticket/47618

Reviewed by: rmeggins(Thanks!)
Mark Reynolds 11 lat temu
rodzic
commit
01cb401033

+ 1 - 0
Makefile.am

@@ -574,6 +574,7 @@ update_DATA = ldap/admin/src/scripts/exampleupdate.pl \
 	ldap/admin/src/scripts/81changelog.pl \
 	ldap/admin/src/scripts/90subtreerename.pl \
 	ldap/admin/src/scripts/91subtreereindex.pl \
+	ldap/admin/src/scripts/50updateconfig.ldif \
 	ldap/admin/src/scripts/dnaplugindepends.ldif
 
 update_SCRIPTS = ldap/admin/src/scripts/exampleupdate.sh

+ 1 - 0
Makefile.in

@@ -1982,6 +1982,7 @@ update_DATA = ldap/admin/src/scripts/exampleupdate.pl \
 	ldap/admin/src/scripts/81changelog.pl \
 	ldap/admin/src/scripts/90subtreerename.pl \
 	ldap/admin/src/scripts/91subtreereindex.pl \
+	ldap/admin/src/scripts/50updateconfig.ldif \
 	ldap/admin/src/scripts/dnaplugindepends.ldif
 
 update_SCRIPTS = ldap/admin/src/scripts/exampleupdate.sh

+ 10 - 0
ldap/admin/src/scripts/50updateconfig.ldif

@@ -0,0 +1,10 @@
+#
+# Updates for the cn=config entry
+#
+
+# Enable the Normalized DN cache
+dn: cn=config
+changetype: modify
+replace: nsslapd-ndn-cache-enabled
+nsslapd-ndn-cache-enabled: on
+

+ 2 - 0
ldap/admin/src/scripts/DSUpdate.pm.in

@@ -378,6 +378,8 @@ sub updateDSInstance {
                 push @ldiffiles, "$inf->{General}->{prefix}@templatedir@/template-dnaplugin.ldif";
                 push @ldiffiles, $inf->{General}->{prefix} . $DS_UPDATE_PATH . "/dnaplugindepends.ldif";
             }
+            push @ldiffiles, $inf->{General}->{prefix} . $DS_UPDATE_PATH . "/50updateconfig.ldif";
+
             for my $ldiffile (@ldiffiles) {
                 my @localerrs = processUpdate($ldiffile, $inf, $configdir, $stage,
                                               $inst, $dseldif, $conn);

+ 1 - 1
ldap/ldif/template-dse.ldif.in

@@ -56,7 +56,7 @@ nsslapd-rootdn: %rootdn%
 nsslapd-rootpw: %ds_passwd%
 nsslapd-maxdescriptors: 1024
 nsslapd-max-filter-nest-level: 40
-nsslapd-ndn-cache-enabled: off
+nsslapd-ndn-cache-enabled: on
 nsslapd-sasl-mapping-fallback: off
 
 dn: cn=features,cn=config

+ 1 - 1
ldap/servers/slapd/libglobs.c

@@ -1507,7 +1507,7 @@ FrontendConfig_init () {
   cfg->disk_threshold = 2097152;  /* 2 mb */
   cfg->disk_grace_period = 60; /* 1 hour */
   init_disk_logging_critical = cfg->disk_logging_critical = LDAP_OFF;
-  init_ndn_cache_enabled = cfg->ndn_cache_enabled = LDAP_OFF;
+  init_ndn_cache_enabled = cfg->ndn_cache_enabled = LDAP_ON;
   cfg->ndn_cache_max_size = NDN_DEFAULT_SIZE;
   init_sasl_mapping_fallback = cfg->sasl_mapping_fallback = LDAP_OFF;
   cfg->ignore_vattrs = LDAP_OFF;