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

Sushanth Sowmyan commented on HIVE-12261:
-----------------------------------------

Hi [~thejas] - looks good to me, +1.

I will admit that for a moment there, I thought that 
HiveSchemaTool.verifySchemaVersion was now doing the wrong thing by testing for 
newSchemaVersion >= MetaStoreSchemaInfo.getHiveSchemaVersion() instead of the 
equality before to verify the update, but I see why I was wrong to assume so. 
Maybe worth adding a comment there to explain there what the compatibility 
check does, and why the direction of >= is correct for it.


> schematool version info exit status should depend on compatibility, not 
> equality
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-12261
>                 URL: https://issues.apache.org/jira/browse/HIVE-12261
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 1.3.0, 2.0.0
>            Reporter: Thejas M Nair
>            Assignee: Thejas M Nair
>         Attachments: HIVE-12261-branch-1.0.0.patch, 
> HIVE-12261-branch-1.patch, HIVE-12261.1.patch
>
>
> Newer versions of metastore schema are compatible with older versions of 
> hive, as only new tables or columns are added with additional information.
> HIVE-11613 added a check in hive schematool -info command to see if schema 
> version is equal. 
> However, the state where db schema version is ahead of hive software version 
> is often seen when a 'rolling upgrade' or 'rolling downgrade' is happening. 
> This is a state where hive is functional and returning non zero status for it 
> is misleading.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to