Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize: remove H2 and pgsql get primary index code and close resultSet #1535

Merged
merged 5 commits into from
Aug 28, 2019
Merged

optimize: remove H2 and pgsql get primary index code and close resultSet #1535

merged 5 commits into from
Aug 28, 2019

Conversation

slievrly
Copy link
Member

Ⅰ. Describe what this PR did

optimize: remove H2 and pgsql get primary index code and close resultSet

Ⅱ. Does this pull request fix one issue?

fix #1534

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Aug 27, 2019

Codecov Report

Merging #1535 into develop will increase coverage by 0.04%.
The diff coverage is 37.6%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1535      +/-   ##
=============================================
+ Coverage      46.41%   46.46%   +0.04%     
- Complexity      1692     1693       +1     
=============================================
  Files            347      347              
  Lines          12719    12711       -8     
  Branches        1591     1586       -5     
=============================================
+ Hits            5904     5906       +2     
+ Misses          6173     6166       -7     
+ Partials         642      639       -3
Impacted Files Coverage Δ Complexity Δ
...rm/datasource/sql/struct/TableMetaCacheOracle.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...seata/rm/datasource/sql/struct/TableMetaCache.java 55.69% <85.45%> (+2.03%) 14 <0> (ø) ⬇️
...o/seata/server/coordinator/DefaultCoordinator.java 54.12% <0%> (+0.91%) 29% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f9667f...4413917. Read the comment docs.

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -113,99 +112,97 @@ private static TableMeta fetchSchemeInDefaultWay(DataSource dataSource, String t

private static TableMeta resultSetMetaToSchema(ResultSetMetaData rsmd, DatabaseMetaData dbmd, String tableName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rsmd never used

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -89,8 +89,7 @@ private static TableMeta fetchSchema(DataSource dataSource, String tableName) th
return fetchSchemeInDefaultWay(dataSource, tableName);
}

private static TableMeta fetchSchemeInDefaultWay(DataSource dataSource, String tableName)
throws SQLException {
private static TableMeta fetchSchemeInDefaultWay(DataSource dataSource, String tableName) throws SQLException {
Connection conn = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

close conn

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great found.

Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

slievrly and others added 2 commits August 28, 2019 11:02
Signed-off-by: slievrly <slievrly@163.com>
Copy link
Contributor

@zjinlei zjinlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize get TableMeta
6 participants