Skip to content

GitHub Feature #17 Added DependsOn to prevent a race condition.#32

Merged
kaushalaroraharman merged 1 commit intoeclipse-ecsp:17-feat-abstractroutingdatasource-implementation-for-multitenancyfrom
ihussainbadshah:17-feat-abstractroutingdatasource-implementation-for-multitenancy
Nov 27, 2025
Merged

GitHub Feature #17 Added DependsOn to prevent a race condition.#32
kaushalaroraharman merged 1 commit intoeclipse-ecsp:17-feat-abstractroutingdatasource-implementation-for-multitenancyfrom
ihussainbadshah:17-feat-abstractroutingdatasource-implementation-for-multitenancy

Conversation

@ihussainbadshah
Copy link
Contributor

Please refer to our contributing docs for any questions on submitting a pull request.
Issues are required for both bug fixes and features.

Resolves #17


Describe behaviour before the change

A couple of class - PostgresDbHealthMonitor.java and PostgresDbHealthService.java were not previously depending upon a bean - PostgresDbConfig which is responsible for the initialization of tenantId -> targetDataSource map. This map's instance is injected into former classes and because of the dependency issue, a race condition may occur where those classes may use the map before it's completely initialized causing abnormal behavior.

Describe behaviour after the change

PostgresDbHealthMonitor.java and PostgresDbHealthService.java have been made dependent upon the config class to ensure proper initialization order.

Pull request checklist

  • I have read the CONTRIBUTING.md
  • My code follows the code style of this project
  • Tests for the changes have been added (for bug fixes / features)
  • All new and existing tests passed.
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

  • Yes
  • No

@kaushalaroraharman kaushalaroraharman self-assigned this Nov 27, 2025
@kaushalaroraharman kaushalaroraharman merged commit 2f9a6f8 into eclipse-ecsp:17-feat-abstractroutingdatasource-implementation-for-multitenancy Nov 27, 2025
1 of 2 checks passed
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.

2 participants