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

Add mutex when searching replicaset's owner #230

Merged
merged 3 commits into from
May 31, 2022

Conversation

NeJan2020
Copy link
Collaborator

Avoid looking up the ReplicaSet while the ReplicaSet is updating.

Fix #229

But there are still some risks that can't find the ReplicaSet's owner when the ReplicaSet&POD was just created and triggered the addPod method firstly, although it usually won't happen.

Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
@NeJan2020 NeJan2020 requested a review from dxsup May 31, 2022 03:26
@dxsup dxsup changed the title Add Mutex durning searching replicaSet's Owner Add mutex when searching replicaset's owner May 31, 2022
@dxsup
Copy link
Member

dxsup commented May 31, 2022

Could you write a testcase to reproduce this issue and validate that this PR could resolve it?

link KindlingProject#229

Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
@NeJan2020
Copy link
Collaborator Author

Could you write a testcase to reproduce this issue and validate that this PR could resolve it?

Just add a testcase

Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Copy link
Member

@dxsup dxsup left a comment

Choose a reason for hiding this comment

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

LGTM

@dxsup dxsup merged commit 8d2fec6 into KindlingProject:main May 31, 2022
@NeJan2020 NeJan2020 deleted the fix/sync-problem-in-k8s_cache branch June 28, 2022 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected workload_kind named 'Replicaset' in k8s-topology
2 participants