]> 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>
Sat, 10 Oct 2020 12:23:39 +0000 (13:23 +0100)
Bump up number of keys for which we use fine-grained splitpoint search

libraries/liblmdb/mdb.c

index e81bd415b44acddcdda37a10fdbf85a799759c87..13be4b128fc07cfddabd7296d4b506b9d360ce6a 100644 (file)
@@ -10167,7 +10167,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) {