Entity update should not lock the cluster entity
Author: pallavi-rao
Reviewers:
Closes from pallavi-rao/2335
@@ -565,6 +565,7 @@ public abstract class AbstractEntityManager extends AbstractMetadataResource {
//now obtain locks for all dependent entities if any.
Set<Entity> affectedEntities = EntityGraph.get().getDependents(entity);
for (Entity e : affectedEntities) {
+ if (e.getEntityType() != EntityType.CLUSTER) {
if (memoryLocks.acquireLock(e, command)) {
tokenList.add(e);
LOG.debug("{} on entity {} has acquired lock on {}", command, entity, e);
@@ -576,6 +577,7 @@ public abstract class AbstractEntityManager extends AbstractMetadataResource {
}
}
}
+ }
private void releaseEntityLocks(String entityName, List<Entity> tokenList) {
if (tokenList != null && !tokenList.isEmpty()) {
