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 2022/12/15 06:24:00 UTC

[jira] [Work logged] (HIVE-25707) SchemaTool may leave the metastore in-between upgrade steps

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

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

                Author: ASF GitHub Bot
            Created on: 15/Dec/22 06:23
            Start Date: 15/Dec/22 06:23
    Worklog Time Spent: 10m 
      Work Description: DanielZhu58 opened a new pull request, #3863:
URL: https://github.com/apache/hive/pull/3863

   ### What changes were proposed in this pull request?
   We only commit when all the changes in schema upgrade is successful.
   Otherwise, we do not commit.
   
   
   ### Why are the changes needed?
   Currently, as schematool applies schema changes during an upgrade, each change is autocommitted. So if it fails after applying a few changes from an upgrade file, those changes remain in the schema. So re-running the schematool fails at the first line because that change already exists.
   
   Instead, we should create a transactional boundary between each upgrade file, aka commit only after all the changes in an upgrade file are successful.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   
   ### How was this patch tested?
   Maven build and unit test.
   




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

            Worklog Id:     (was: 833696)
    Remaining Estimate: 0h
            Time Spent: 10m

> SchemaTool may leave the metastore in-between upgrade steps
> -----------------------------------------------------------
>
>                 Key: HIVE-25707
>                 URL: https://issues.apache.org/jira/browse/HIVE-25707
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> it seems like:
> * schematool runs the sql files via beeline
> * autocommit is turned on
> * pressing ctrl+c or killing the process will result in an invalid schema
> https://github.com/apache/hive/blob/6e02f6164385a370ee8014c795bee1fa423d7937/beeline/src/java/org/apache/hive/beeline/schematool/HiveSchemaTool.java#L79



--
This message was sent by Atlassian Jira
(v8.20.10#820010)