Skip to content

feat: operator can be restarted #1675

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

Merged
merged 10 commits into from
Jan 5, 2023
Merged

feat: operator can be restarted #1675

merged 10 commits into from
Jan 5, 2023

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Dec 21, 2022

No description provided.

@csviri csviri self-assigned this Dec 21, 2022
@csviri
Copy link
Collaborator Author

csviri commented Dec 21, 2022

closes #1578

@csviri csviri marked this pull request as draft December 22, 2022 09:42
@csviri csviri marked this pull request as ready for review December 22, 2022 10:41
@csviri csviri requested a review from metacosm December 22, 2022 10:41
@csviri csviri linked an issue Dec 22, 2022 that may be closed by this pull request
@@ -376,6 +365,8 @@ public synchronized void stop() {

@Override
public void start() throws OperatorException {
// on restart new executor service is created and needs to be set here
executor = ExecutorServiceManager.instance().executorService();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the executor service be shut down then in stop?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes but what I meant is that we're lacking symmetry between start and stop here (i.e. the executor service is stopped at another level). Maybe stop should set executor to null to prevent it from being used before being restarted? I guess this is more a theoretical question than a practical one.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2023

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 1 Code Smell

75.0% 75.0% Coverage
0.0% 0.0% Duplication

@@ -376,6 +365,8 @@ public synchronized void stop() {

@Override
public void start() throws OperatorException {
// on restart new executor service is created and needs to be set here
executor = ExecutorServiceManager.instance().executorService();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes but what I meant is that we're lacking symmetry between start and stop here (i.e. the executor service is stopped at another level). Maybe stop should set executor to null to prevent it from being used before being restarted? I guess this is more a theoretical question than a practical one.

@csviri csviri merged commit f6e30d4 into main Jan 5, 2023
@csviri csviri deleted the restart branch January 5, 2023 15:12
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.

Multiple Start/Stop do not work anymore
2 participants