[ 
https://issues.apache.org/jira/browse/HIVE-2758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Phabricator updated HIVE-2758:
------------------------------

    Attachment: HIVE-2758.D1491.2.patch

kevinwilfong updated the revision "HIVE-2758 [jira] Metastore is caching too 
aggressively".
Reviewers: JIRA, njain, heyongqiang, cwsteinbach

  Added a unit test to the metastore tests.  It creates a table using the 
current HiveMetaStoreClient, then simulates another client renaming the table 
by changing the value in the db.  It then attempts to get the table again using 
the new name and verifying the name of the table is correct.  This test is used 
for both the metastore Thrift server and an embedded metastore.

  Using the current configuration, it fails with the exception
  "Client returned table with different name after rename. 
expected:<[]concurrenttbl> but was:<[rename_]concurrenttbl>"
  Indicating that the client can retrieve the table with the new name, but when 
it checks the name stored in the Table object, it is still the old name.
  Using the update in this patch, however, it succeeds.

REVISION DETAIL
  https://reviews.facebook.net/D1491

AFFECTED FILES
  metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java

                
> Metastore is caching too aggressively
> -------------------------------------
>
>                 Key: HIVE-2758
>                 URL: https://issues.apache.org/jira/browse/HIVE-2758
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kevin Wilfong
>            Assignee: Kevin Wilfong
>         Attachments: HIVE-2758.D1491.1.patch, HIVE-2758.D1491.2.patch
>
>
> The metastore is caching values, like table names and locations too 
> aggressively, leading to inconsistencies across Hive clients and metastore 
> Thrift servers.
> For example, open two Hive clients, in each call
> DESCRIBE FORMATTED table_foo;
> Then in one of those clients, execute
> ALTER TABLE table_foo RENAME TO table_bar;
> Then in both clients call
> DESCRIBE FORMATTED table_bar;
> In the client that executed the alter command, the location is correct, 
> however, in the other Hive client, it will still show the original location 
> of table_foo.
> A similar experiment can be done using metastore Thrift servers, substituting 
> get_table for DESCRIBE FORMATTED and alter_table for ALTER TABLE ... RENAME 
> TO.
> On the Thrift server you can see that the one which did not execute the alter 
> command, not only returns the wrong location, despite calling 
> get_table('table_bar') it will return a table that still has the name 
> table_foo.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to