Skip to content

Commit 229b17f

Browse files
committed
Do not merge zero profiles in MergeProfiles RPC to avoid panic
commit_hash:17fe0fd9e05a6658c888bf43f894767253cd33bd
1 parent 4569aad commit 229b17f

File tree

1 file changed

+4
-0
lines changed
  • perforator/internal/symbolizer/proxy/server

1 file changed

+4
-0
lines changed

perforator/internal/symbolizer/proxy/server/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,10 @@ func (s *PerforatorServer) fetchAndRenderProfileFast(
12861286
return nil, fmt.Errorf("failed to select profiles: %w", err)
12871287
}
12881288

1289+
if len(profiles) == 0 {
1290+
return nil, status.Errorf(codes.NotFound, "no profiles found")
1291+
}
1292+
12891293
err = s.populateMergeSession(ctx, profiles, session)
12901294
if err != nil {
12911295
return nil, fmt.Errorf("failed to download profiles: %w", err)

0 commit comments

Comments
 (0)