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 2022/03/15 10:48:11 UTC

[GitHub] [cloudstack] rohityadavcloud commented on a change in pull request #6118: api: Fix issue observed with message publish on creation of domain

rohityadavcloud commented on a change in pull request #6118:
URL: https://github.com/apache/cloudstack/pull/6118#discussion_r826829833



##########
File path: server/src/main/java/com/cloud/user/DomainManagerImpl.java
##########
@@ -220,11 +220,10 @@ public DomainVO doInTransaction(TransactionStatus status) {
                 _resourceCountDao.createResourceCounts(domain.getId(), ResourceLimit.ResourceOwnerType.Domain);
 
                 CallContext.current().putContextParameter(Domain.class, domain.getUuid());
-                _messageBus.publish(_name, MESSAGE_ADD_DOMAIN_EVENT, PublishScope.LOCAL, domain.getId());
                 return domain;
             }
         });
-
+        _messageBus.publish(_name, MESSAGE_ADD_DOMAIN_EVENT, PublishScope.LOCAL, domain.getId());

Review comment:
       Just wondering if this is cause for concern, what if the transaction fails for some reason @Pearl1594, should we check for that (for ex. the domain ID is not null) ?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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