pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone
Blob Blame History Raw
From ff597260ef2f5e953b55ae1a8511191853becca8 Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slaznick@redhat.com>
Date: Fri, 27 Oct 2017 09:34:38 +0200
Subject: [PATCH] Add indexing to improve host-find performance

host-find <host_name> command performance gets deteriorated when
there's way too many hosts in the LDAP tree. We're adding indices
to try and mitigate this behavior.

https://pagure.io/freeipa/issue/6371

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
---
 install/share/indices.ldif        | 45 +++++++++++++++++++++++++++++++++++++++
 install/updates/20-indices.update | 40 ++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git a/install/share/indices.ldif b/install/share/indices.ldif
index adb041d374d8fc48fff9d4b40208e7eda82857b3..7bd59d2774df9bdf56f6b8034236aa2c5658b366 100644
--- a/install/share/indices.ldif
+++ b/install/share/indices.ldif
@@ -279,3 +279,48 @@ objectClass: nsIndex
 nsSystemIndex: false
 nsIndexType: eq
 nsIndexType: sub
+
+dn: cn=description,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+changetype: add
+cn: description
+objectClass: top
+objectClass: nsindex
+nssystemindex: false
+nsindextype: eq
+nsindextype: sub
+
+dn: cn=l,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+changetype: add
+cn: l
+objectClass: top
+objectClass: nsindex
+nssystemindex: false
+nsindextype: eq
+nsindextype: sub
+
+dn: cn=nsOsVersion,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+changetype: add
+cn: nsOsVersion
+objectClass: top
+objectClass: nsindex
+nssystemindex: false
+nsindextype: eq
+nsindextype: sub
+
+dn: cn=nsHardwarePlatform,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+changetype: add
+cn: nsHardwarePlatform
+objectClass: top
+objectClass: nsindex
+nssystemindex: false
+nsindextype: eq
+nsindextype: sub
+
+dn: cn=nsHostLocation,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+changetype: add
+cn: nsHostLocation
+objectClass: top
+objectClass: nsindex
+nssystemindex: false
+nsindextype: eq
+nsindextype: sub
diff --git a/install/updates/20-indices.update b/install/updates/20-indices.update
index fb588b9ba8a2a89c9e7eab87ab5f224ca438645a..016fbb6bedb6af69fba0a8a84f8c1c6622d4368c 100644
--- a/install/updates/20-indices.update
+++ b/install/updates/20-indices.update
@@ -260,3 +260,43 @@ default: objectClass: nsIndex
 only: nsSystemIndex: false
 only: nsIndexType: eq
 only: nsIndexType: sub
+
+dn: cn=description,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+default: cn: description
+default: objectclass: top
+default: objectclass: nsindex
+default: nssystemindex: false
+default: nsindextype: eq
+default: nsindextype: sub
+
+dn: cn=l,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+default: cn: l
+default: objectclass: top
+default: objectclass: nsindex
+default: nssystemindex: false
+default: nsindextype: eq
+default: nsindextype: sub
+
+dn: cn=nsOsVersion,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+default: cn: nsOsVersion
+default: objectclass: top
+default: objectclass: nsindex
+default: nssystemindex: false
+default: nsindextype: eq
+default: nsindextype: sub
+
+dn: cn=nsHardwarePlatform,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+default: cn: nsHardwarePlatform
+default: objectclass: top
+default: objectclass: nsindex
+default: nssystemindex: false
+default: nsindextype: eq
+default: nsindextype: sub
+
+dn: cn=nsHostLocation,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
+default: cn: nsHostLocation
+default: objectclass: top
+default: objectclass: nsindex
+default: nssystemindex: false
+default: nsindextype: eq
+default: nsindextype: sub
-- 
2.14.3