Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #7702 to 1.68.x #7792

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Conversation

purnesh42H
Copy link
Contributor

Original PR (#7702)

RELEASE NOTES:

  • mem: use slice capacity instead of length, to determine whether to pool buffers or directly allocate them

…ol buffers or directly allocate them (grpc#7702)

* Address grpc#7631 by correctly pooling large-capacity buffers

As the issue states, `mem.NewBuffer` would not pool buffers with a length below
the pooling threshold but whose capacity is actually larger than the pooling
threshold. This can lead to buffers being leaked.

---------

Co-authored-by: Purnesh Dixit <purneshdixit@google.com>
Co-authored-by: Easwar Swaminathan <easwars@google.com>
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.13%. Comparing base (54841ef) to head (86d7d65).
Report is 1 commits behind head on v1.68.x.

Additional details and impacted files
@@             Coverage Diff             @@
##           v1.68.x    #7792      +/-   ##
===========================================
- Coverage    82.24%   81.13%   -1.12%     
===========================================
  Files          362      362              
  Lines        28116    35671    +7555     
===========================================
+ Hits         23123    28940    +5817     
- Misses        3815     5526    +1711     
- Partials      1178     1205      +27     
Files with missing lines Coverage Δ
mem/buffers.go 88.18% <100.00%> (+4.34%) ⬆️

... and 315 files with indirect coverage changes

@arvindbr8
Copy link
Member

vet failed (non-blocking, but worth checking) -

/opt/hostedtoolcache/go/1.23.2/x64/src/runtime/time.go:204:17: cannot range over 3 (untyped int constant): requires go1.22 or later (compile)

Weird that we don't see this in every run

@arvindbr8 arvindbr8 assigned purnesh42H and unassigned easwars and dfawley Oct 29, 2024
@purnesh42H purnesh42H merged commit b79fb61 into grpc:v1.68.x Oct 30, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants