phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject [3/6] phoenix git commit: PHOENIX-4694 Prevent locking of parent table when dropping view to reduce contention
Date Thu, 26 Apr 2018 16:52:24 GMT
PHOENIX-4694 Prevent locking of parent table when dropping view to reduce contention


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2e177126
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2e177126
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2e177126

Branch: refs/heads/4.x-HBase-1.3
Commit: 2e1771261656002729b5943f2c4b2050a7bb8a1b
Parents: 4b7a14c
Author: James Taylor <jtaylor@salesforce.com>
Authored: Thu Apr 19 15:09:43 2018 -0700
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Thu Apr 26 09:51:01 2018 -0700

----------------------------------------------------------------------
 .../java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2e177126/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index ddd3ffe..29eee7e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -2007,8 +2007,9 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements
Coprocesso
             }
             List<byte[]> tableNamesToDelete = Lists.newArrayList();
             List<SharedTableState> sharedTablesToDelete = Lists.newArrayList();
+            // No need to lock parent table for views
             byte[] parentTableName = MetaDataUtil.getParentTableName(tableMetadata);
-            byte[] lockTableName = parentTableName == null ? tableName : parentTableName;
+            byte[] lockTableName = parentTableName == null || tableType.equals(PTableType.VIEW.getSerializedValue())
? tableName : parentTableName;
             byte[] lockKey = SchemaUtil.getTableKey(tenantIdBytes, schemaName, lockTableName);
             byte[] key =
                     parentTableName == null ? lockKey : SchemaUtil.getTableKey(tenantIdBytes,


Mime
View raw message