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

make Timer task run as a daemon thread #20014

Merged
merged 3 commits into from
Mar 24, 2021
Merged

Conversation

yiliuTo
Copy link
Member

@yiliuTo yiliuTo commented Mar 22, 2021

This pr is to fix a bug of KeyVault Secret starter that refresh Timer task blocks application termination. Solution is to make Timer task run in a daemon thread.

@ghost ghost added the azure-spring All azure-spring related issues label Mar 22, 2021
@yiliuTo
Copy link
Member Author

yiliuTo commented Mar 22, 2021

/azp run java - spring - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yiliuTo
Copy link
Member Author

yiliuTo commented Mar 23, 2021

Change log will be updated after the release of 3.3.0 is done.

@yiliuTo yiliuTo changed the title make timer as daemon thread make Timer task run as a daemon thread Mar 23, 2021
@yiliuTo yiliuTo marked this pull request as ready for review March 24, 2021 02:14
Copy link
Contributor

@backwind1233 backwind1233 left a comment

Choose a reason for hiding this comment

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

LGTM

@yiliuTo
Copy link
Member Author

yiliuTo commented Mar 24, 2021

/check-enforcer override

@yiliuTo yiliuTo merged commit a62580c into Azure:master Mar 24, 2021
@stliu
Copy link
Member

stliu commented Mar 24, 2021

Actually I don't like this idea, is there a way to get rid of this Timer and replace it with ScheduledThreadPoolExecutor ?
And make this more spring way?

I can see this KeyVaultOperation is only used by KeyVaultEnvironmentPostProcessor, can this KeyVaultEnvironmentPostProcessor implements DisposableBean work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants