Skip to content

Conversation

hugehoo
Copy link
Contributor

@hugehoo hugehoo commented Sep 11, 2025

Fixes: #8529
RELEASE NOTES: N/A

This PR fixes to increment metrics only when the stream is active which is found in the activeStreams map.

as-is

  • The deleteStream was incrementing channelz metrics every time it was called, even when stream was already removed from activeStreams or not exists in activeStreams.

to-be

  • Added check to ensure metrics are only incremented once when a stream is actually removed from activeStreams.

Copy link

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.67%. Comparing base (8420f3f) to head (e856376).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8573      +/-   ##
==========================================
- Coverage   80.91%   80.67%   -0.24%     
==========================================
  Files         413      413              
  Lines       40751    40771      +20     
==========================================
- Hits        32972    32893      -79     
- Misses       6155     6220      +65     
- Partials     1624     1658      +34     
Files with missing lines Coverage Δ
internal/transport/http2_server.go 87.40% <100.00%> (-3.48%) ⬇️

... and 19 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hugehoo hugehoo marked this pull request as ready for review September 11, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transport: Servers may emit extra channelz stream metrics on cancellation
1 participant