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

ensuring that the reconnect task terminates #5331

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

shawkins
Copy link
Contributor

Description

Partially addresses: #5327

There are two parts to the issue:

  • ensure that all async tasks terminate, which is what this commit does and is suitable for backport. Prior to this fix I think that informers created by a client, but that are not explicitly closed, will leak a task (which has a reference to the full client) in the scheduler queue indefinitely. After this fix they will eventually be expunged once the timeout is reached.

  • a larger change is needed to perform proactive cleanup of scheduled tasks when the client is closed - only the executor is currently passed around and we don't have a completeablefuture or other callback mechanism for registering things that closable. Most of the relevant timeouts are short and/or cleanup will be triggered by the failure of the httpclient. However the client side timeout is much longer and ignorant of client close, so at least a targeted improvement is warrented.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@rohanKanojia
Copy link
Member

@shawkins : Could you please resolve minor conflicts?

@manusa manusa added this to the 6.8.0 milestone Jul 18, 2023
Comment on lines 67 to +69
public Reflector(ListerWatcher<T, L> listerWatcher, SyncableStore<T> store) {
this(listerWatcher, store, Runnable::run);
}
Copy link
Member

Choose a reason for hiding this comment

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

We might want to completely remove this constructor or at least make it package-private.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

88.9% 88.9% Coverage
0.0% 0.0% Duplication

@manusa manusa merged commit 20be3e6 into fabric8io:master Jul 18, 2023
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.

3 participants