You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DynamicCollection does not free the pages of old indexes on DropIndex and VacuumAsync(RebuildIndexes) #211
Typed collections free an index's pages when it is dropped or replaced (CollectionIndexManager.DropIndex, ReplaceIndex). DynamicCollection doesn't, for any index kind:
DropIndex (DynamicCollection.cs:1737-1742) removes the index from the dictionary and calls PersistIndexMetadata(), but never frees the tree.
VacuumAsync(RebuildIndexes = true) (:1511, persisted at :1615) builds fresh indexes and overwrites the entries, leaving every old tree unreachable.
Each drop and each rebuild therefore leaks a full tree. It also skips documents that ReadDocumentAt can't read without reporting them, unlike the typed rebuild since #170.
Expected
Same behaviour as typed collections: collect the old tree's pages (B-Tree, vector, spatial once #205 lands) and free them after the swap is persisted; on a failed rebuild, collect the copy's pages through the transaction before rolling back, as RebuildIndexFromScratchAsync does.
Activity