From 4ca9a9d0094962c7a911da4453b7ffa63bcfc7a6 Mon Sep 17 00:00:00 2001 From: hardikl Date: Fri, 29 Sep 2023 14:15:53 +0530 Subject: [PATCH] feat: handled review comments --- cmd/collectors/zapi/plugins/aggregate/aggregate.go | 2 +- cmd/collectors/zapi/plugins/volume/volume.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/collectors/zapi/plugins/aggregate/aggregate.go b/cmd/collectors/zapi/plugins/aggregate/aggregate.go index 0a00dd61c..cc4105957 100644 --- a/cmd/collectors/zapi/plugins/aggregate/aggregate.go +++ b/cmd/collectors/zapi/plugins/aggregate/aggregate.go @@ -59,7 +59,7 @@ func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, er if err != nil { a.Logger.Error().Err(err).Msg("Failed to update footprint data") // clean the map in case of the error - aggrFootprintMap = make(map[string]map[string]string) + clear(aggrFootprintMap) } // update aggregate instance label with cloud stores info diff --git a/cmd/collectors/zapi/plugins/volume/volume.go b/cmd/collectors/zapi/plugins/volume/volume.go index 6fa2fd64d..ad9cc9b7b 100644 --- a/cmd/collectors/zapi/plugins/volume/volume.go +++ b/cmd/collectors/zapi/plugins/volume/volume.go @@ -100,7 +100,7 @@ func (v *Volume) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error if err != nil { v.Logger.Error().Err(err).Msg("Failed to update footprint data") // clean the map in case of the error - volumeFootprintMap = make(map[string]map[string]string) + clear(volumeFootprintMap) } // update volume instance labels