-
Notifications
You must be signed in to change notification settings - Fork 1.2k
CLOUDSTACK-8901: PrepareTemplate job thread hard-coded to max 8 threads #880
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
Conversation
cloudstack-pull-rats #713 SUCCESS |
cloudstack-pull-analysis #663 SUCCESS |
49ed8ee
to
785741e
Compare
cloudstack-pull-rats #752 SUCCESS |
cloudstack-pull-analysis #703 SUCCESS |
SSVMPSK("Hidden", ManagementServer.class, String.class, "upload.post.secret.key", "", "PSK with SSVM", null); | ||
SSVMPSK("Hidden", ManagementServer.class, String.class, "upload.post.secret.key", "", "PSK with SSVM", null), | ||
|
||
TemplatePreloaderPoolSize("Advanced", TemplateManager.class, Integer.class, "template.preloader.pool.size", "8", "Size of the TemplateManager threadpool", null); |
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.
Use the mechanism described here to add a new configuration. https://cwiki.apache.org/confluence/display/CLOUDSTACK/Configuration.
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.
@koushik-das, changed the mechanism to use configuration.
785741e
to
b2f0c9c
Compare
cloudstack-pull-rats #760 SUCCESS |
cloudstack-pull-analysis #711 SUCCESS |
@@ -278,6 +278,8 @@ | |||
@Inject | |||
private EndPointSelector selector; | |||
|
|||
protected final ConfigKey<Integer> TemplatePreloaderPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "template.preloader.pool.size", "8", "Size of the TemplateManager threadpool", false); |
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.
@SudharmaJain You have to implement the Configurable interface. Check for its usage in code.
b2f0c9c
to
b610543
Compare
cloudstack-pull-rats #772 SUCCESS |
cloudstack-pull-analysis #724 SUCCESS |
@@ -413,3 +413,4 @@ CREATE TABLE `cloud`.`ldap_trust_map` ( | |||
UNIQUE KEY `uk_ldap_trust_map__domain_id` (`domain_id`), | |||
CONSTRAINT `fk_ldap_trust_map__domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`) | |||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |||
|
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.
Please remove this empty line.
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.
Removed the empty line.
LGTM. |
Rebased against master. |
Thanks @SudharmaJain LGTM (just code review), can you do a push -f (travis job failed for some reason) |
@bhaisaab I pushed it again. |
LGTM tag:easypr Cc @swill |
We need another code review. How should I test this, does it have to be a manual test? |
LGTM. Verified that a configuration entry is added with default 8 as pool size. Increased the default threadpool size, restarted MS and verified that when multiple prepareTemplate APIs are invoked required number of threads gets created. INFO c.c.t.TemplateManagerImpl (logid:49186ba8) Start to preload template 201 into primary storage 2 |
@swill This has the required LGTMs. |
Thanks @koushik-das. I will run this through CI just to be sure everything is good... Thx. |
CI RESULTS
Summary of the problem(s):
Associated Uploads
Uploads will be available until Comment created by |
These connectivity issues are unrelated to this PR. I will merge this now... |
CLOUDSTACK-8901: PrepareTemplate job thread hard-coded to max 8 threads The thread pool was hardcoded to use 8 threads, com.cloud.template.TemplateManagerImpl.configure(String, Map<String, Object>): _preloadExecutor = Executors.newFixedThreadPool(8, new NamedThreadFactory("Template-Preloader")); Added the change to pick threadpool size from configuration. * pr/880: CLOUDSTACK-8901: PrepareTemplate job thread hard-coded to max 8 threads Signed-off-by: Will Stevens <williamstevens@gmail.com>
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com> Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
The thread pool was hardcoded to use 8 threads,
com.cloud.template.TemplateManagerImpl.configure(String, Map<String, Object>):
_preloadExecutor = Executors.newFixedThreadPool(8, new NamedThreadFactory("Template-Preloader"));
Added the change to pick threadpool size from configuration.