Skip already rehashed positions in the old hashmap table

When iterating through the old internal hashmap table, skip all the
nodes that have been already migrated to the new table.  We know that
all positions with index less than .hiter are NULL.
This commit is contained in:
Ondřej Surý
2024-08-12 15:22:54 +02:00
parent acdc57259f
commit 3e4d153453

View File

@@ -646,7 +646,7 @@ isc__hashmap_iter_next(isc_hashmap_iter_t *iter) {
if (try_nexttable(hashmap, iter->hindex)) {
iter->hindex = hashmap_nexttable(iter->hindex);
iter->i = 0;
iter->i = hashmap->hiter;
iter->size = hashmap->tables[iter->hindex].size;
return (isc__hashmap_iter_next(iter));
}