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

Perform garbage collection asynchronously #496

Merged
merged 2 commits into from
Feb 25, 2019
Merged

Perform garbage collection asynchronously #496

merged 2 commits into from
Feb 25, 2019

Conversation

astefanutti
Copy link
Member

Fixes #487

pkg/trait/gc.go Outdated
selectors := []string{
fmt.Sprintf("camel.apache.org/integration=%s", e.Integration.Name),
"camel.apache.org/generation",
fmt.Sprintf("camel.apache.org/generation notin (%d)", e.Integration.GetGeneration()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't this delete running resources ?

Assuming we are on generation 2: at the time this method runs it could be possible that there is a new generation 3 running which that may get deleted by this method.

Isn't it ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Very possible 🤕! I've just added a check that makes sure only older generation resources are deleted. Thanks!

@lburgazzoli lburgazzoli merged commit ca4d656 into apache:master Feb 25, 2019
@astefanutti astefanutti deleted the pr-22 branch February 25, 2019 15:32
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.

None yet

3 participants