trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertamarton <>
Subject [GitHub] incubator-trafodion pull request #661: [TRAFODION-2161] Support migration of...
Date Thu, 18 Aug 2016 01:13:24 GMT
Github user robertamarton commented on a diff in the pull request:
    --- Diff: core/sql/sqlcomp/CmpSeabaseDDLrepos.cpp ---
    @@ -516,6 +585,62 @@ short CmpSeabaseDDL::upgradeReposComplete(ExeCliInterface * cliInterface,
             case 1:
    +            // If there were views on the old Repository tables, they are
    +            // still there, by virtue of the fact that we did "SKIP VIEW CHECK"
    +            // on the ALTER TABLE RENAME. Now we will capture their view
    +            // definitions (which will contain the old table name, not the
    +            // renamed table name) and replay that against the new Repository
    +            // table. If the replay fails, we treat that as an unrecoverable
    +            // situation and ignore it. Instead, we'll save the view definition
    +            // text in the TEXT table with a different TEXT_TYPE and clue the
    +            // user in that it is there. They can then try to create the view
    +            // at their leisure. Note that they may have to change the view
    +            // definition themselves, e.g. if we dropped a column from the
    +            // repository table that their view happened to reference.
    +            //
    +            // Note that this work is done in one step because the only state
    +            // we can depend upon across redrives to this method is the substep
    +            // number. Any in-memory list would be lost across redrives.
    +            NABoolean someViewSaved = FALSE;
    --- End diff --
    If you have a view on two different REPOS tables and both tables are being changed.  Would
the view be dropped and recreated twice?  Would they have to be recreated in any specific
order?  Along with that, if there is a view that references a view on multiple REPOS tables,
are there any issues?  For example, view one creates a view on tables REPOS1 and REPOS2, view
two creates a view on view one,  table REPOS3 and a system metadata table.    REPOS1, REPOS2,
REPOS3, and the system metadata table are all being upgraded.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message