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

[FLINK-30840][sql-client] Fix resource leak when creating Executor #21800

Merged
merged 3 commits into from Feb 6, 2023

Conversation

fsk119
Copy link
Member

@fsk119 fsk119 commented Jan 31, 2023

What is the purpose of the change

We should shut down the executors when failed to creating the Executor. Shut down the ExecutorService can releases used system resources.

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 31, 2023

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@lincoln-lil lincoln-lil left a comment

Choose a reason for hiding this comment

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

@fsk119 thanks for fixing this! Can use such as 'AutoCloseableRegistry' to unify the release of various resources?If do so, we may easier to handle multiple resources and exception messages

Copy link
Contributor

@lincoln-lil lincoln-lil left a comment

Choose a reason for hiding this comment

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

LGTM! only one minor comment

try {
registry.close();
} catch (Throwable t) {
// ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we'd better log the suppressed exception though it will not cause failure

@fsk119 fsk119 merged commit 152edf6 into apache:master Feb 6, 2023
@fsk119 fsk119 deleted the fix-leak branch March 8, 2023 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants