Skip to content

Conversation

henry118
Copy link
Member

Use local variable for rt when iterating collectors

When iterating collectors, rt should be stored in a local variable. Otherwise gcnode could contain random types.

In the sample debugging output below, the rt value should be 11 in my case, but it has value 8 instead, which is the stream resource.

time="2023-01-13T21:28:06.129285403Z" level=debug msg="[GC] key: containerd.io/gc.ref.network, ks: containerd.io/gc.ref.network.cni-loopback/lo, vs: default/cni-loopback/8ddd3dce5cb55a7e32c27d2b69878c3fd9b946bdc73749a081621bf91e47b90f/lo, rt: 8"

Signed-off-by: Henry Wang henwang@amazon.com

Signed-off-by: Henry Wang <henwang@amazon.com>
@k8s-ci-robot
Copy link

Hi @henry118. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@dmcgowan dmcgowan merged commit 412ca49 into containerd:main Jan 13, 2023
@henry118 henry118 deleted the gc-bug branch March 8, 2023 17:31
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.

4 participants