You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/03/01 08:45:00 UTC

[jira] [Work logged] (HIVE-24820) MaterializedViewCache enables adding multiple entries of the same Materialization instance

     [ https://issues.apache.org/jira/browse/HIVE-24820?focusedWorklogId=559271&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-559271 ]

ASF GitHub Bot logged work on HIVE-24820:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Mar/21 08:44
            Start Date: 01/Mar/21 08:44
    Worklog Time Spent: 10m 
      Work Description: kasakrisz opened a new pull request #2030:
URL: https://github.com/apache/hive/pull/2030


   ### What changes were proposed in this pull request?
   1. Replace ConcurrentMap.compute to computeIfAbsent in MaterializedViewsCache.putIfAbsent
   2. Add a new version of `HiveMaterializedViewsRegistry.refresh()`
   3. When rebuilding Instead of adding a new instance of the same MV refresh the existing one in the cache.
   
   ### Why are the changes needed?
   Using ConcurrentMap.compute enabled adding multiple entries of the same Materialization instance to the sqlText -> materialization map.
   `HiveMaterializedViewsRegistry.refresh(HiveConf conf, Table oldMaterializedViewTable, Table materializedViewTable)` did not removed outdated cache entry since a newer version of the passed table object was loaded from MetaStore in `MaterializedViewUpdateOperation`.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest=TestMaterializedViewsCache -pl ql
   mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=materialized_view_create_rewrite_3.q -pl itests/qtest -Pitests
   ```


----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 559271)
    Time Spent: 40m  (was: 0.5h)

> MaterializedViewCache enables adding multiple entries of the same Materialization instance
> ------------------------------------------------------------------------------------------
>
>                 Key: HIVE-24820
>                 URL: https://issues.apache.org/jira/browse/HIVE-24820
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>




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