]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8969 tweak mdb_page_split
authorHoward Chu <hyc@openldap.org>
Wed, 30 Jan 2019 23:43:34 +0000 (23:43 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 30 Jan 2019 23:43:34 +0000 (23:43 +0000)
Bump up number of keys for which we use fine-grained splitpoint search

libraries/liblmdb/mdb.c

index 3b2745f95a73e50f86321eb6ba24b48f9304f1fe..8e67d5981b1c77335d466db2511c13251691d767 100644 (file)
@@ -9641,7 +9641,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
                         * the split so the new page is emptier than the old page.
                         * This yields better packing during sequential inserts.
                         */
-                       if (nkeys < 20 || nsize > pmax/16 || newindx >= nkeys) {
+                       if (nkeys < 32 || nsize > pmax/16 || newindx >= nkeys) {
                                /* Find split point */
                                psize = 0;
                                if (newindx <= split_indx || newindx >= nkeys) {