Github user ChinmaySKulkarni commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/406#discussion_r236463122
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 ---
    @@ -2150,11 +2156,21 @@ public void createTable(RpcController controller, 
CreateTableRequest request,
                     ImmutableBytesPtr parentCacheKey = null;
                     PTable parentTable = null;
                     if (parentTableName != null) {
    -                    // we lock the parent table when creating an index on 
a table or a view
    -                    if (tableType == PTableType.INDEX) {
    +                    // From 4.15 onwards we only need to lock the parent 
table :
    +                    // 1) when creating an index on a table or a view
    +                    // 2) if allowSystemCatalogRollback is true we try to 
lock the parent table to prevent it
    --- End diff --
    
    @twdsilva don't we need to have a way to figure out if a rollback is in 
progress and only acquire the lock if it is currently ongoing, rather than be 
based on the value of *allowSystemCatalogRollback* alone?


---

Reply via email to