[ 
https://issues.apache.org/jira/browse/PHOENIX-6124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17215942#comment-17215942
 ] 

ASF GitHub Bot commented on PHOENIX-6124:
-----------------------------------------

yanxinyi commented on a change in pull request #917:
URL: https://github.com/apache/phoenix/pull/917#discussion_r506961711



##########
File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterParentTableWithSysCatRollbackIT.java
##########
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.phoenix.end2end;
+
+import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.thirdparty.com.google.common.collect.Maps;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.SchemaUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+@Category(NeedsOwnMiniClusterTest.class)
+public class AlterParentTableWithSysCatRollbackIT extends BaseTest {
+
+    private String getJdbcUrl() {
+        return "jdbc:phoenix:localhost:" + 
getUtility().getZkCluster().getClientPort()
+            + ":/hbase";
+    }
+
+    @BeforeClass
+    public static synchronized void doSetup() throws Exception {
+        Map<String, String> serverProps = Maps.newHashMapWithExpectedSize(1);
+        
serverProps.put(QueryServices.ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK, "true");

Review comment:
       I think Phoenix already tested add/dropColumnOnParentTableView when 
ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK=false so no dup tests are needed. 
   Just want to double confirm :) 




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

For queries about this service, please contact Infrastructure at:
[email protected]


> Block adding/dropping a column on a parent view for clients <4.15 and for 
> clients that have phoenix.allow.system.catalog.rollback=true
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6124
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6124
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 5.0.0, 4.15.0
>            Reporter: Chinmay Kulkarni
>            Assignee: Viraj Jasani
>            Priority: Blocker
>             Fix For: 5.1.0, 4.16.0
>
>         Attachments: PHOENIX-6124.master.000.patch
>
>
> For pre-4.15 clients, we have to block adding/dropping a column to a table if 
> it has child views since we can’t do any checkAndPut distributed locking (see 
> [this|https://github.com/apache/phoenix/blob/6ecc66738e576a5349605c2f5b20003df03f95de/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java#L2595-L2616]).
>  
> However, this is only prevented if the parent is a table and not if the 
> parent is a view. We should extend [the 
> condition|https://github.com/apache/phoenix/blob/6ecc66738e576a5349605c2f5b20003df03f95de/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java#L2591]
>  to also cover views since conflicting mutations on its children can also 
> lead to inconsistencies.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to