]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9612 slapd: change index_hash64 default to on
authorHoward Chu <hyc@openldap.org>
Tue, 7 Apr 2026 12:11:14 +0000 (13:11 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 7 Apr 2026 17:53:39 +0000 (17:53 +0000)
And document that the default is now 64bit, and the option
will be removed in the future.

doc/man/man5/slapd-config.5
doc/man/man5/slapd.conf.5
servers/slapd/schema_init.c

index 37054b2ba4862145e413b876918f297a1a262b0e..d84fc6b77d5b65f0dd71f6b58f9eabf91d7d2a41 100644 (file)
@@ -502,14 +502,15 @@ feature.  The default is 0. You may also want to set the
 option.
 .TP
 .B olcIndexHash64: { TRUE | FALSE }
-Use a 64 bit hash for indexing. The default is to use 32 bit hashes.
-These hashes are used for equality and substring indexing. The 64 bit
-version may be needed to avoid index collisions when the number of
+Use a 64 bit hash for indexing, otherwise 32 bit. The default is
+now 64 bit. These hashes are used for equality and substring indexing.
+The 64 bit version avoids index collisions when the number of
 indexed values exceeds ~64 million. (Note that substring indexing
 generates multiple index values per actual attribute value.)
 Indices generated with 32 bit hashes are incompatible with the 64 bit
-version, and vice versa. Any existing databases must be fully reloaded
-when changing this setting. This directive is only supported on 64 bit CPUs.
+version, and vice versa. Any existing databases must be fully reindexed
+when changing this setting. Since 64 bit is now the default, this option
+is deprecated and will eventually be removed.
 .TP
 .B olcIndexIntLen: <integer>
 Specify the key length for ordered integer indices. The most significant
index 89c77edcb217a80449fab613570b070e1d600ea1..6f4503e0bfb74f5bb6b4c6817e8f499c85927d35 100644 (file)
@@ -525,14 +525,15 @@ Read additional configuration information from the given file before
 continuing with the next line of the current file.
 .TP
 .B index_hash64 { on | off }
-Use a 64 bit hash for indexing. The default is to use 32 bit hashes.
-These hashes are used for equality and substring indexing. The 64 bit
-version may be needed to avoid index collisions when the number of
+Use a 64 bit hash for indexing, otherwise 32 bit. The default is
+now 64 bit. These hashes are used for equality and substring indexing.
+The 64 bit version avoids index collisions when the number of
 indexed values exceeds ~64 million. (Note that substring indexing
 generates multiple index values per actual attribute value.)
 Indices generated with 32 bit hashes are incompatible with the 64 bit
-version, and vice versa. Any existing databases must be fully reloaded
-when changing this setting. This directive is only supported on 64 bit CPUs.
+version, and vice versa. Any existing databases must be fully reindexed
+when changing this setting. Since 64 bit is now the default, this option
+is deprecated and will eventually be removed.
 .TP
 .B index_intlen <integer>
 Specify the key length for ordered integer indices. The most significant
index 1fcfe36934b5a1336bd8d7feb53cce44e99d8c19..4305f97e9428d1d830824b14df9d0930920a5a96 100644 (file)
 #ifdef LUTIL_HASH64_BYTES
 #define HASH_BYTES                             LUTIL_HASH64_BYTES
 #define HASH_LEN       hashlen
-static void (*hashinit)(lutil_HASH_CTX *ctx) = lutil_HASHInit;
-static void (*hashupdate)(lutil_HASH_CTX *ctx,unsigned char const *buf, ber_len_t len) = lutil_HASHUpdate;
-static void (*hashfinal)(unsigned char digest[HASH_BYTES], lutil_HASH_CTX *ctx) = lutil_HASHFinal;
-static int hashlen = LUTIL_HASH_BYTES;
+static void (*hashinit)(lutil_HASH_CTX *ctx) = lutil_HASH64Init;
+static void (*hashupdate)(lutil_HASH_CTX *ctx,unsigned char const *buf, ber_len_t len) = lutil_HASH64Update;
+static void (*hashfinal)(unsigned char digest[HASH_BYTES], lutil_HASH_CTX *ctx) = lutil_HASH64Final;
+static int hashlen = LUTIL_HASH64_BYTES;
 #define HASH_Init(c)                   hashinit(c)
 #define HASH_Update(c,buf,len) hashupdate(c,buf,len)
 #define HASH_Final(d,c)                        hashfinal(d,c)
@@ -145,7 +145,7 @@ int slap_hash64( int onoff )
 #define HASH_Update(c,buf,len) lutil_HASHUpdate(c,buf,len)
 #define HASH_Final(d,c)                        lutil_HASHFinal(d,c)
 
-int slap_has64( int onoff )
+int slap_hash64( int onoff )
 {
        if ( onoff < 0 )
                return 0;