spring-cloud / spring-cloud/spring-cloud-commons

HirakAri shutdown in Refresh endpoint

Open
#1,198 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
751
Forks
744
Avg merge
1d 14h
Merged PRs (30d)
9

Description

Describe the bug
We are using spring boot 2.7.0 , spring batch 4.3.6 and hikari 4.0.3 .

Our batch application is used to migrate data from ORACLE DB to POSTGRES DB and we are using @Refreshscope to update both DB credentials.

So when ever the refresh endpoint invoked , Hikari is shutting down even then batch job is in progress .

I tried various work around 1. Graceful Shutdown 2. refreshable property , but nothing seems to be working.

Sample
If possible, please provide a test case or sample application that reproduces
the problem. This makes it much easier for us to diagnose the problem and to verify that
we have fixed it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Spring Boot 2.7.0, Spring Batch 4.3.6, Hikari 4.0.3, @RefreshScope, and the refresh endpoint while a batch migration runs. Compare datasource behavior before and after refresh; done means an in-progress batch job is not interrupted by Hikari shutdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql, spring-boot
Domain
api, backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.