You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by pa...@apache.org on 2018/08/09 10:18:56 UTC

falcon git commit: FALCON-2335 Entity update should not lock the cluster entity

Repository: falcon
Updated Branches:
  refs/heads/master 411d90c2f -> 90c955db1


FALCON-2335 Entity update should not lock the cluster entity

Author: pallavi-rao <pa...@inmobi.com>

Reviewers: @sandeepSamudrala

Closes #409 from pallavi-rao/2335


Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/90c955db
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/90c955db
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/90c955db

Branch: refs/heads/master
Commit: 90c955db16739ce6b6671576264fc89ebcdde009
Parents: 411d90c
Author: pallavi-rao <pa...@inmobi.com>
Authored: Thu Aug 9 15:48:47 2018 +0530
Committer: pallavi-rao <pa...@inmobi.com>
Committed: Thu Aug 9 15:48:47 2018 +0530

----------------------------------------------------------------------
 .../falcon/resource/AbstractEntityManager.java    | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/90c955db/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
index 8daf8c7..eeab8ed 100644
--- a/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
+++ b/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
@@ -565,14 +565,16 @@ 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 (memoryLocks.acquireLock(e, command)) {
-                tokenList.add(e);
-                LOG.debug("{} on entity {} has acquired lock on {}", command, entity, e);
-            } else {
-                LOG.error("Error while trying to acquire lock on {}. Releasing already obtained locks",
-                        e.toShortString());
-                throw new FalconException("There are multiple update commands running for dependent entity "
-                        + e.toShortString());
+            if (e.getEntityType() != EntityType.CLUSTER) {
+                if (memoryLocks.acquireLock(e, command)) {
+                    tokenList.add(e);
+                    LOG.debug("{} on entity {} has acquired lock on {}", command, entity, e);
+                } else {
+                    LOG.error("Error while trying to acquire lock on {}. Releasing already obtained locks",
+                            e.toShortString());
+                    throw new FalconException("There are multiple update commands running for dependent entity "
+                            + e.toShortString());
+                }
             }
         }
     }