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

Create informer per resources to avoid huge memory consumption #7325

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

ywk253100
Copy link
Contributor

Create informer per resources to avoid huge memory consumption

Fixes #7323

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #(issue)

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

Create informer per resources to avoid huge memory consumption

Fixes vmware-tanzu#7323

Signed-off-by: Wenkai Yin(尹文开) <[email protected]>
@ywk253100 ywk253100 added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Jan 17, 2024
@ywk253100 ywk253100 requested a review from sseago January 17, 2024 14:40
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (fdb2981) 61.76% compared to head (8aa6a8e) 61.74%.

Files Patch % Lines
pkg/client/dynamic.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.13    #7325      +/-   ##
================================================
- Coverage         61.76%   61.74%   -0.03%     
================================================
  Files               262      262              
  Lines             28440    28419      -21     
================================================
- Hits              17567    17546      -21     
  Misses             9642     9642              
  Partials           1231     1231              

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

@@ -1123,6 +1093,7 @@ func (ctx *restoreContext) getResource(groupResource schema.GroupResource, obj *
ctx.log.WithError(errors.WithStack(fmt.Errorf("expected *unstructured.Unstructured but got %T", u))).Error("unable to understand entry returned from client")
return nil, fmt.Errorf("expected *unstructured.Unstructured but got %T", u)
}
ctx.log.Debugf("get %s, %s/%s from informer cache", groupResource, namespace, name)
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

@shubham-pampattiwar
Copy link
Collaborator

Thank you @ywk253100
Also, please create a docs note PR regarding the probable memory consumption increase.

@ywk253100 ywk253100 merged commit 42bbf87 into vmware-tanzu:release-1.13 Jan 18, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants