diff --git a/mdb.c b/mdb.c index 1503d41a..78a052a3 100644 --- a/mdb.c +++ b/mdb.c @@ -5410,7 +5410,11 @@ mdb_page_search_root(MDB_cursor *mc, MDB_val *key, int flags) indx_t i; mdb_debug("branch page %zu has %u keys", mp->mp_pgno, NUMKEYS(mp)); - mdb_cassert(mc, NUMKEYS(mp) > 1); + /* Don't assert on branch pages in the FreeDB. We can get here + * while in the process of rebalancing a FreeDB branch page; we must + * let that proceed. ITS#8336 + */ + mdb_cassert(mc, !mc->mc_dbi || NUMKEYS(mp) > 1); mdb_debug("found index 0 to page %zu", NODEPGNO(NODEPTR(mp, 0))); if (flags & (MDB_PS_FIRST|MDB_PS_LAST)) {