Skip to content
Open
Changes from 1 commit
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 namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ func (n *SimpleNamespace) RemoveExperiment(name string) error {
}
}

for _, val := range segmentsToFree {
delete(n.segmentAllocations, uint64(val))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could delete be done inside the loop where values are added tosegmentsToFree? (instead of iterating segmentsToFree outside separately)
https://github.com/biased-unit/planout-golang/blob/master/namespace.go#L98

}

for i := range segmentsToFree {
n.availableSegments = append(n.availableSegments, segmentsToFree[i])
}
Expand Down