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

fix the memory leak in sink manager (#1401) #1402

Merged
merged 3 commits into from
Feb 3, 2021
Merged

Conversation

zier-one
Copy link
Contributor

@zier-one zier-one commented Feb 3, 2021

What problem does this PR solve?

fix the memory leak in sink manager, this bug is import by #1247 , fix #1398

What is changed and how it works?

https://github.com/pingcap/ticdc/blob/6febbae2ec0425fcad6ad74a0644ec595ccc0189/cdc/sink/manager.go#L149

image

  • The blue squares represent the space referenced by t.buffer
  • The yellow squares represent space that has been discarded by the t.buffer
  • All squares that are not white hold a reference of RowChangeEvnet

The yellow squares is unreachable but can't be GC, because the b.buffer reference the array and the array include the yellow squares, the GO GC can't reclaim this space.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • No release note

@zier-one zier-one changed the title fix mem leak fix the memory leak in sink manager Feb 3, 2021
@amyangfei
Copy link
Contributor

/run-all-tests

@zier-one zier-one changed the title fix the memory leak in sink manager fix the memory leak in sink manager (#1401) Feb 3, 2021
@amyangfei
Copy link
Contributor

/run-kafka-tests

@amyangfei amyangfei added this to the v4.0.11 milestone Feb 3, 2021
@amyangfei amyangfei added type/bugfix This PR fixes a bug. status/ptal Could you please take a look? labels Feb 3, 2021
Copy link
Contributor

@amyangfei amyangfei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 3, 2021
@overvenus overvenus added the release-blocker This issue blocks a release. Please solve it ASAP. label Feb 3, 2021
@amyangfei
Copy link
Contributor

PTAL @overvenus @liuzix

@amyangfei
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 3, 2021
@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 1390

@ti-srebot
Copy link
Contributor

/run-all-tests

@overvenus
Copy link
Member

/lgtm

@amyangfei
Copy link
Contributor

/merge

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 3, 2021
@amyangfei
Copy link
Contributor

/merge

@amyangfei
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit a89d6ca into release-4.0 Feb 3, 2021
@amyangfei amyangfei deleted the fix_leak_4.0 branch February 3, 2021 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker This issue blocks a release. Please solve it ASAP. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. status/ptal Could you please take a look? type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants