-
Notifications
You must be signed in to change notification settings - Fork 191
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
Introduce parallel rollout processing #2248
base: master
Are you sure you want to change the base?
Introduce parallel rollout processing #2248
Conversation
Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
Can one of the admins verify this patch? |
...epository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/rollout/RolloutScheduler.java
Outdated
Show resolved
Hide resolved
...jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java
Outdated
Show resolved
Hide resolved
...epository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/rollout/RolloutScheduler.java
Outdated
Show resolved
Hide resolved
...epository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/rollout/RolloutScheduler.java
Outdated
Show resolved
Hide resolved
… Changing to previous default behaviour when the thread pool size is <=1 Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
...jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java
Outdated
Show resolved
Hide resolved
...epository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/rollout/RolloutScheduler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
Quality Gate passedIssues Measures |
final RolloutHandler rolloutHandler, final SystemSecurityContext systemSecurityContext) { | ||
return new RolloutScheduler(rolloutHandler, systemManagement, systemSecurityContext); | ||
final RolloutHandler rolloutHandler, final SystemSecurityContext systemSecurityContext, @Value("${hawkbit.rollout.executor.thread-pool.size:1}") int threadPoolSize) { | ||
return new RolloutScheduler(rolloutHandler, systemManagement, systemSecurityContext, threadPoolSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it final
import java.util.concurrent.ThreadPoolExecutor; | ||
|
||
public class BlockWhenFullPolicy implements RejectedExecutionHandler { | ||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 spaces indents, please use hawkbit formatter
this.systemManagement = systemManagement; | ||
this.rolloutHandler = rolloutHandler; | ||
this.systemSecurityContext = systemSecurityContext; | ||
this.rolloutTaskExecutor = threadPoolTaskExecutor(threadPoolSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this. is not needed
return null; | ||
}); | ||
} | ||
|
||
private void handleAll(String tenant) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it final
Current default behaviour is preserved if the thread pool size is <=1 (default thread pool size value is 1). If parallel execution is needed, the hawkbit.rollout.executor.thread-pool.size property should be set to a value > 1