Skip to content

fix(ttstream): adjust stream state transition and remove all SetFinalizer to avoid memory leak #1734

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

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

DMwangnima
Copy link
Contributor

@DMwangnima DMwangnima commented Mar 13, 2025

What type of PR is this?

fix

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

fix(ttstream): 调整流的生命周期状态变更并且移除 SetFinalizer 来避免内存泄漏

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@DMwangnima DMwangnima requested review from a team as code owners March 13, 2025 14:05
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 82.75862% with 5 lines in your changes missing coverage. Please review.

Project coverage is 59.16%. Comparing base (4031e2a) to head (0cc5bdb).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
client/option_ttstream.go 0.00% 2 Missing ⚠️
server/option_ttstream.go 0.00% 2 Missing ⚠️
internal/client/option.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1734      +/-   ##
===========================================
- Coverage    63.78%   59.16%   -4.63%     
===========================================
  Files          379      379              
  Lines        34328    34430     +102     
===========================================
- Hits         21895    20369    -1526     
- Misses       11122    12821    +1699     
+ Partials      1311     1240      -71     
Flag Coverage Δ
integration 47.05% <58.62%> (-0.07%) ⬇️
unit 50.05% <58.62%> (-5.69%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@DMwangnima DMwangnima force-pushed the fix/ttstream_memory_leak branch 4 times, most recently from b941133 to 212986a Compare March 18, 2025 08:55
@DMwangnima DMwangnima changed the title fix(ttstream): remove all SetFinalizer and adjust closeSend callback to avoid memory leak fix(ttstream): adjust stream state transition and remove all SetFinalizer to avoid memory leak Mar 18, 2025
@DMwangnima DMwangnima force-pushed the fix/ttstream_memory_leak branch from c46bc7c to 23fa129 Compare March 18, 2025 09:27
@DMwangnima DMwangnima force-pushed the fix/ttstream_memory_leak branch from 23fa129 to 63c78a5 Compare March 18, 2025 13:27
@DMwangnima DMwangnima force-pushed the fix/ttstream_memory_leak branch 2 times, most recently from d6d4d85 to 219d50f Compare March 18, 2025 14:01
@DMwangnima DMwangnima force-pushed the fix/ttstream_memory_leak branch from 9e5ea8f to 0cc5bdb Compare March 19, 2025 11:12
@DMwangnima DMwangnima merged commit 020c8ce into cloudwego:develop Mar 20, 2025
21 of 22 checks passed
@DMwangnima DMwangnima deleted the fix/ttstream_memory_leak branch March 20, 2025 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants