]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Less hungry mdb_pages_xkeep()
authorHallvard Furuseth <hallvard@openldap.org>
Thu, 27 Jul 2017 06:22:34 +0000 (08:22 +0200)
committerHoward Chu <hyc@openldap.org>
Sat, 10 Oct 2020 12:00:42 +0000 (13:00 +0100)
Skip pages that are dirty only in an ancestor txn

libraries/liblmdb/mdb.c

index 7c0343447df46944c5fe68b3c4866b6b63559331..92b9fcde384356062db5db62eea658ae8db4b8bc 100644 (file)
@@ -2297,11 +2297,11 @@ mdb_pages_xkeep(MDB_cursor *mc, unsigned pflags, int all)
                                for (j=0; j<m3->mc_snum; j++) {
                                        mp = m3->mc_pg[j];
                                        if ((mp->mp_flags & Mask) == pflags)
-                                         if (IS_DIRTY_NW(txn, mp))
+                                         if (IS_WRITABLE(txn, mp))
                                                mp->mp_flags ^= P_KEEP;
                                }
                                if (MC_OVPG(m3) && ((MC_OVPG(m3)->mp_flags & Mask) == pflags) &&
-                                       IS_DIRTY_NW(txn, MC_OVPG(m3)))
+                                       IS_WRITABLE(txn, MC_OVPG(m3)))
                                        MC_OVPG(m3)->mp_flags ^= P_KEEP;
                                mx = m3->mc_xcursor;
                                /* Proceed to mx if it is at a sub-database */