Peter Vary created HIVE-22116:

             Summary: MaterializedView refresh check might return incorrect 
result when Compaction is run
                 Key: HIVE-22116
             Project: Hive
          Issue Type: Bug
          Components: Materialized views
            Reporter: Peter Vary

Reading the code of TxnHandler.getMaterializationInvalidationInfo I see that we 
decide on the freshness of the view based on the COMPLETED_TXN_COMPONENTS 
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.
When the following sequence of events happen we do not refresh the materialized 
- 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

Reply via email to