deniskuzZ commented on code in PR #6434:
URL: https://github.com/apache/hive/pull/6434#discussion_r3139545135


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/materialized/alter/rebuild/AlterMaterializedViewRebuildAnalyzer.java:
##########
@@ -179,6 +179,24 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
 
     LOG.debug("Rebuilding materialized view " + 
tableName.getNotEmptyDbTable());
     super.analyzeInternal(rewrittenAST);
+
+    if (!this.ctx.isExplainPlan() && AcidUtils.isTransactionalTable(mvTable)) {

Review Comment:
   don't we need to take lock before rewrite? what would happen to the 2nd 
concurrent request when 1st is completed - would it be discarded?



##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/materialized/alter/rebuild/AlterMaterializedViewRebuildAnalyzer.java:
##########
@@ -179,6 +179,24 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
 
     LOG.debug("Rebuilding materialized view " + 
tableName.getNotEmptyDbTable());
     super.analyzeInternal(rewrittenAST);
+
+    if (!this.ctx.isExplainPlan() && AcidUtils.isTransactionalTable(mvTable)) {

Review Comment:
   don't we need to take lock before rewrite? 
   what would happen to the 2nd concurrent request when 1st is completed - 
would it be discarded?



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

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to