You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/04/23 08:05:56 UTC

[GitHub] [cloudstack] shwstppr commented on a change in pull request #4944: Fix NPE on template garbage collection on primary storage

shwstppr commented on a change in pull request #4944:
URL: https://github.com/apache/cloudstack/pull/4944#discussion_r619023569



##########
File path: engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java
##########
@@ -68,7 +68,11 @@
 
     @Override
     public TemplateInfo getTemplateOnPrimaryStorage(long templateId, DataStore store, String configuration) {
-        VMTemplateVO templ = imageDataDao.findById(templateId);
+        VMTemplateVO templ = imageDataDao.findByIdIncludingRemoved(templateId);

Review comment:
       @nvazquez `getTemplateOnPrimaryStorage` is also used by `PrimaryDataStoreImpl::getTemplate`. Will using `findByIdIncludingRemoved` here would affect those workflows?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org