Skip to content

Change Bulk Copy API for batch insert to respect the timeout value#817

Merged
peterbae merged 2 commits intomicrosoft:devfrom
peterbae:github-803
Oct 26, 2018
Merged

Change Bulk Copy API for batch insert to respect the timeout value#817
peterbae merged 2 commits intomicrosoft:devfrom
peterbae:github-803

Conversation

@peterbae
Copy link
Contributor

@peterbae peterbae commented Oct 1, 2018

Fixes issue #803

Statements can have timeouts on their query, and currently this isn't being respected by Bulk Copy API for batch insert. This PR fixes that issue.

I've tested this manually and confirmed the queryTimeout value is correctly applied to the Bulk Copy operation.

@codecov-io
Copy link

codecov-io commented Oct 1, 2018

Codecov Report

Merging #817 into dev will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #817      +/-   ##
============================================
- Coverage     48.67%   48.59%   -0.09%     
+ Complexity     2817     2794      -23     
============================================
  Files           116      116              
  Lines         27878    27885       +7     
  Branches       4651     4651              
============================================
- Hits          13571    13550      -21     
+ Misses        12173    12126      -47     
- Partials       2134     2209      +75
Flag Coverage Δ Complexity Δ
#JDBC42 48.11% <100%> (+0.21%) 2751 <0> (+4) ⬆️
#JDBC43 48.42% <100%> (-0.15%) 2786 <0> (-21)
Impacted Files Coverage Δ Complexity Δ
...oft/sqlserver/jdbc/SQLServerPreparedStatement.java 51.96% <100%> (-0.27%) 212 <0> (-4)
...m/microsoft/sqlserver/jdbc/SQLServerException.java 77.44% <0%> (-1.51%) 31% <0%> (-2%)
...a/com/microsoft/sqlserver/jdbc/PLPInputStream.java 58.33% <0%> (-1.2%) 33% <0%> (-1%)
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 44.85% <0%> (-0.88%) 107% <0%> (ø)
...n/java/com/microsoft/sqlserver/jdbc/tdsparser.java 68.1% <0%> (-0.87%) 0% <0%> (ø)
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 60.99% <0%> (-0.65%) 89% <0%> (-3%)
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 48.09% <0%> (-0.36%) 335% <0%> (-14%)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 56.22% <0%> (-0.33%) 0% <0%> (ø)
...m/microsoft/sqlserver/jdbc/SQLServerStatement.java 59.51% <0%> (-0.29%) 135% <0%> (-6%)
... and 9 more

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 709342f...f9e6ea6. Read the comment docs.

@cheenamalhotra cheenamalhotra added this to the 7.1.2 milestone Oct 18, 2018
rene-ye
rene-ye previously approved these changes Oct 24, 2018
cheenamalhotra
cheenamalhotra previously approved these changes Oct 24, 2018
@peterbae peterbae dismissed stale reviews from cheenamalhotra and rene-ye via f9e6ea6 October 25, 2018 17:28
@ulvii
Copy link
Contributor

ulvii commented Oct 25, 2018

Please add tests, for default case and when timeout is set.

@peterbae
Copy link
Contributor Author

@ulvii I wanted to write a test as well but that would be difficult. This part of the code is only accessed when the target server is Azure DW.

@peterbae peterbae merged commit e5e88ff into microsoft:dev Oct 26, 2018
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.

5 participants