You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Peter Vary (JIRA)" <ji...@apache.org> on 2019/08/15 15:22:00 UTC

[jira] [Commented] (HIVE-22116) MaterializedView refresh check might return incorrect result when Compaction is run

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

Peter Vary commented on HIVE-22116:
-----------------------------------

CC: [~jcamachorodriguez]

> MaterializedView refresh check might return incorrect result when Compaction is run
> -----------------------------------------------------------------------------------
>
>                 Key: HIVE-22116
>                 URL: https://issues.apache.org/jira/browse/HIVE-22116
>             Project: Hive
>          Issue Type: Bug
>          Components: Materialized views
>            Reporter: Peter Vary
>            Priority: Minor
>
> Reading the code of TxnHandler.getMaterializationInvalidationInfo I see that we decide on the freshness of the view based on the COMPLETED_TXN_COMPONENTS table. 
> See: [https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L2021]
> On the other hand if we run a major compaction we clean up COMPLETED_TXN_COMPONENTS table, so we lose all previous information. We do it in CompactionTxnHandler.markCleaned.
> See: [https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java#L382]
>  
> When the following sequence of events happen we do not refresh the materialized view:
> - Create Table
> - Create MV
> - Refresh MV
> - Update Table
> - Start major compaction
> - Wait until compacted, and cleaned
> - Select Table



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)