Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Free profile objects when cutting a row group #746

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/phlaredb/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ func (pl *profilesIndex) cutRowGroup(rgProfiles []*schemav1.Profile) error {

for _, ps := range pl.profilesPerFP {
// empty all in memory profiles
for i := range ps.profiles {
// Allow GC to evict the object.
ps.profiles[i] = nil
}
ps.profiles = ps.profiles[:0]

// attach rowGroup and rowNum information
Expand Down