> On Nov. 26, 2014, 1:07 a.m., Abraham Elmahrek wrote:
> > repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoConstants.java,
> > line 46
> > <https://reviews.apache.org/r/28463/diff/4/?file=776638#file776638line46>
> >
> > The comments above need to be updated, but this looks good.
>
> Veena Basavaraj wrote:
> on 1.99.4, this test case fails
>
> If there is a double upgrade initiated, it should not throw an exception
> on 1.99.4.
>
> Also changing to a new version is relevant when new upgrade code is added
> in 1.99.5, does not seem right to up a version number otherwise.
> We have not even done that. And it is not trivial change
>
> Second, if it tied to a release that number needs to be then tied to the
> release number and not a random incrementing sequence like we have.
I have better understanding of this issue now.
One of the greatest mysteries of sqoop2
The following code was added when the release was NOT yet to be finalized and
it was in sqoop2, so it actually assumed that the current release version is 4.
if (repositoryVersion <= 4) {
runQuery(QUERY_UPGRADE_TABLE_SQ_CONFIG_ADD_UNIQUE_CONSTRAINT_NAME_TYPE_AND_CONFIGURABLE_ID,
conn);
runQuery(QUERY_UPGRADE_TABLE_SQ_INPUT_ADD_UNIQUE_CONSTRAINT_NAME_TYPE_AND_CONFIG_ID,
conn);
}
Then it was committed to Sqoop2, but not cherry picked for 1.99.4. So
potentially this code belongs to the next release i.e 1.99.5.
It is amazing how we have designed the repository code that depends on the
cherry picking:)
Mt 2 cents if anyone cares to listen.
1. Now in between the releases if we are adding new upgrade code, it is so not
obvious that it changed to 5.
2. These repo version should be tied to some build release numbers/ tags that
update automatically when a branch is cut. It cannot be a hardcoded value in
the code.
We should fix this.
Second just changing the version number wont fix it, we have to update tests
and add test cases for verion2 - verion 5, version 4- version 5.
We need update everywhere in the code that is hardcoded to handle only version
2 or version 4 now.!
- Veena
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28463/#review63102
-----------------------------------------------------------
On Nov. 26, 2014, 1:05 a.m., Qian Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28463/
> -----------------------------------------------------------
>
> (Updated Nov. 26, 2014, 1:05 a.m.)
>
>
> Review request for Sqoop.
>
>
> Bugs: SQOOP-1812
> https://issues.apache.org/jira/browse/SQOOP-1812
>
>
> Repository: sqoop-sqoop2
>
>
> Description
> -------
>
> Unexpected behaviour: Sqoop2 server tries to add an existing constraint
> repeatedly.
>
>
> Diffs
> -----
>
>
> repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoConstants.java
> d869cb7
>
> repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestRespositorySchemaUpgrade.java
> 928c34a
>
> Diff: https://reviews.apache.org/r/28463/diff/
>
>
> Testing
> -------
>
> Added a test case to guard the scenario
>
>
> Thanks,
>
> Qian Xu
>
>