Skip to content

feat: operator can be restarted#1675

Merged
csviri merged 10 commits into
mainfrom
restart
Jan 5, 2023
Merged

feat: operator can be restarted#1675
csviri merged 10 commits into
mainfrom
restart

Conversation

@csviri

@csviri csviri commented Dec 21, 2022

Copy link
Copy Markdown
Collaborator

No description provided.

@csviri csviri self-assigned this Dec 21, 2022
@csviri

csviri commented Dec 21, 2022

Copy link
Copy Markdown
Collaborator Author

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
@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
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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

sonarqubecloud Bot commented Jan 5, 2023

Copy link
Copy Markdown

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

@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
Copy Markdown
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