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

[#2843] Make it possible to have multiple instances of the DbScheduler components. #2853

Merged
merged 7 commits into from
Oct 2, 2023

Conversation

gklijs
Copy link
Member

@gklijs gklijs commented Sep 26, 2023

Change the static methods on the DbSchedulerEventScheduler and the DbSchedulerDeadlineManager to take a supplier, in favour of using a static atomic reference. This makes it possible to use multiple of the same kind of component with scheduler.

Note this will be a breaking change, but only when either used without spring boot, or with customizations. As the break is clear (the methods now need an argument), the components were introduced just in 4.8.0, and the benefits are plenty, I think this should be fine.

Fixes #2843

@gklijs gklijs added Type: Enhancement Use to signal an issue enhances an already existing feature of the project. Priority 2: Should High priority. Ideally, these issues are part of the release they’re assigned to. Status: In Progress Use to signal this issue is actively worked on. labels Sep 26, 2023
@gklijs gklijs added this to the Release 4.9.0 milestone Sep 26, 2023
@gklijs gklijs self-assigned this Sep 26, 2023
…`DbSchedulerDeadlineManager` to take a supplier, in favour of using a static atomic reference. This makes it possible to use multiple of the same kind of component with scheduler.
@gklijs gklijs changed the title Issues/2843 Make it possible to have multiple instances of the DbScheduler components. Sep 29, 2023
@smcvb smcvb changed the title Make it possible to have multiple instances of the DbScheduler components. [#2843] Make it possible to have multiple instances of the DbScheduler components. Sep 29, 2023
Copy link
Member

@smcvb smcvb left a comment

Choose a reason for hiding this comment

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

Bunch of minor comments, and something I'm curious about.
Why make Supplier implementations for the deadline manager and event scheduler?

gklijs and others added 5 commits October 2, 2023 09:23
…/DbSchedulerDeadlineManager.java

Co-authored-by: Steven van Beelen <steven.vanbeelen@axoniq.io>
…/DbSchedulerDeadlineManager.java

Co-authored-by: Steven van Beelen <steven.vanbeelen@axoniq.io>
…ling/dbscheduler/DbSchedulerEventScheduler.java

Co-authored-by: Steven van Beelen <steven.vanbeelen@axoniq.io>
…ling/dbscheduler/DbSchedulerEventScheduler.java

Co-authored-by: Steven van Beelen <steven.vanbeelen@axoniq.io>
@gklijs
Copy link
Member Author

gklijs commented Oct 2, 2023

Bunch of minor comments, and something I'm curious about. Why make Supplier implementations for the deadline manager and event scheduler?

It serves two purposes. It makes it easier to test them without Spring (although we could have used a similar class only in test). It also makes it easier to use them in non-Spring contexts.

@gklijs gklijs requested a review from smcvb October 2, 2023 07:36
@sonarcloud
Copy link

sonarcloud bot commented Oct 2, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
6.5% 6.5% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Copy link
Member

@smcvb smcvb left a comment

Choose a reason for hiding this comment

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

My concerns have been addressed, hence I'm approving this pull request.

@gklijs gklijs merged commit 7c635fb into master Oct 2, 2023
5 of 8 checks passed
@gklijs gklijs deleted the issues/2843 branch October 2, 2023 09:06
@gklijs gklijs added Status: Resolved Use to signal that work on this issue is done. and removed Status: In Progress Use to signal this issue is actively worked on. labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 2: Should High priority. Ideally, these issues are part of the release they’re assigned to. Status: Resolved Use to signal that work on this issue is done. Type: Enhancement Use to signal an issue enhances an already existing feature of the project.
Projects
None yet
2 participants