Fix bug where hpa_shard was not being destroyed

It appears that this was a simple mistake where `hpa_shard_disable` was
being called instead of `hpa_shard_destroy`. At present
`hpa_shard_destroy` is not called anywhere at all outside of test-cases,
which further suggests that this is a bug. @davidtgoldblatt noted
however that since HPA is disabled for manual arenas and we don't
support destruction for auto arenas that presently there is no way to
actually trigger this bug. Nonetheless, it should be fixed.
This commit is contained in:
Kevin Svetlitski 2023-05-18 10:13:59 -07:00 committed by Qi Wang
parent 4e6f1e9208
commit 9c32689e57

View File

@ -108,7 +108,7 @@ pa_shard_destroy(tsdn_t *tsdn, pa_shard_t *shard) {
pac_destroy(tsdn, &shard->pac); pac_destroy(tsdn, &shard->pac);
if (shard->ever_used_hpa) { if (shard->ever_used_hpa) {
sec_flush(tsdn, &shard->hpa_sec); sec_flush(tsdn, &shard->hpa_sec);
hpa_shard_disable(tsdn, &shard->hpa_shard); hpa_shard_destroy(tsdn, &shard->hpa_shard);
} }
} }