Skip to content

Commit

Permalink
NDEV-17738 sort before chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
pns-nirmata committed Oct 17, 2023
1 parent 4ef8dc1 commit 18e27ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controllers/report/aggregate/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ func (c *controller) reconcile(ctx context.Context, logger logr.Logger, key, _,
chunkSize = len(results)
}
for name, results := range splitReports {
reportutils.SortReportResults(results)
for i := 0; i < len(results); i += chunkSize {
end := i + chunkSize
if end > len(results) {
Expand Down

0 comments on commit 18e27ed

Please sign in to comment.