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

Allow AtomicUpdate() to surface the error when the key doesn't exist #4326

Merged
merged 1 commit into from
Feb 12, 2015

Conversation

yujuhong
Copy link
Contributor

In some cases, when the key doesn't exist, AtomicUpdate should simply fail and
surface the error. This PR adds a new function parameter "ignoreNotFound"
for this purpose.

This PR fixes the main symptom in #3950.

@yujuhong
Copy link
Contributor Author

cc @dchen1107, @davidopp

@yujuhong
Copy link
Contributor Author

Update: ran the script I used to reproduce the issue and found no phantom pods after creating/deleting >800 pods in total over a long period of time (with this PR).

@smarterclayton
Copy link
Contributor

Add a test case that reproduces the failure

In some cases, when the key doesn't exist, AtomicUpdate should simply fail and
surface the error. This change adds a new function parameter "ignoreNotFound"
for this purpose.
@yujuhong
Copy link
Contributor Author

@smarterclayton, I updated the PR to include the test. PTAL!

@smarterclayton
Copy link
Contributor

LGTM

@smarterclayton smarterclayton added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2015
smarterclayton added a commit that referenced this pull request Feb 12, 2015
Allow AtomicUpdate() to surface the error when the key doesn't exist
@smarterclayton smarterclayton merged commit 7d43971 into kubernetes:master Feb 12, 2015
@yujuhong yujuhong deleted the phantom_pods branch March 5, 2015 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants