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

- Delete backing string set from a threadSafeMap index when the string set length reaches 0. #84970

Merged

Conversation

@pdzwart-atlassian
Copy link
Contributor

pdzwart-atlassian commented Nov 8, 2019

What type of PR is this?
/sig api-machinery
/kind bug

What this PR does / why we need it:

Reduce memory footprint of threadSafeMap for indices that have churn of high-cardinality keys. E.g. namespaces.

Which issue(s) this PR fixes:
Fixes #84959

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 8, 2019

Welcome @pdzwart-atlassian!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 8, 2019

Hi @pdzwart-atlassian. Thanks for your PR.

I'm waiting for a kubernetes 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.

@yue9944882

This comment has been minimized.

Copy link
Member

yue9944882 commented Nov 8, 2019

am pretty there is an exactly same/duplicate PR in this repo

UPATE: gotcha! #77785

@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Nov 8, 2019

this looks good, but needs a unit test exercising the case and demonstrating that no remnants are left

@pdzwart-atlassian

This comment has been minimized.

Copy link
Contributor Author

pdzwart-atlassian commented Nov 10, 2019

I'll get a unit test for the fix submitted with this PR.

@k8s-ci-robot k8s-ci-robot added size/M and removed size/XS labels Nov 11, 2019
@pdzwart-atlassian

This comment has been minimized.

Copy link
Contributor Author

pdzwart-atlassian commented Nov 11, 2019

Basic unit test added. Fails as expected without the delete.

@pdzwart-atlassian pdzwart-atlassian force-pushed the atlassian:pdzwart/kubernetes/kubernetes/84959 branch from f2a3810 to 1be2281 Nov 11, 2019
@pdzwart-atlassian pdzwart-atlassian force-pushed the atlassian:pdzwart/kubernetes/kubernetes/84959 branch from 1be2281 to bf7e829 Nov 11, 2019
@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Nov 11, 2019

/lgtm
/approve
/ok-to-test

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 11, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, pdzwart-atlassian

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Nov 11, 2019

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Nov 11, 2019

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

…g set length reaches 0.

- Added thread_safe_store_test exercising new index backing string set delete at 0 functionality.

- TestThreadSafeStoreDeleteRemovesEmptySetsFromIndex logic nesting inverted.

- Added test case for usage of an index where post element delete there is non-zero count of elements and expect the set to still exist.

- Fixed date.

- Fixed awprice nits.

- Fix bazel.
@pdzwart-atlassian pdzwart-atlassian force-pushed the atlassian:pdzwart/kubernetes/kubernetes/84959 branch from bf7e829 to 29a0513 Nov 11, 2019
@k8s-ci-robot k8s-ci-robot removed the lgtm label Nov 11, 2019
@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Nov 12, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Nov 12, 2019
@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Nov 12, 2019

/priority important-longterm

@k8s-ci-robot k8s-ci-robot merged commit 41be6d6 into kubernetes:master Nov 12, 2019
15 checks passed
15 checks passed
cla/linuxfoundation pdzwart-atlassian authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-kind Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.