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

Fix | Fix SQLServerConnection.abort() API behavior to clear resources consistently #983

Merged
merged 4 commits into from
Mar 13, 2019

Conversation

cheenamalhotra
Copy link
Member

As per Java Specifications, executing Connection.abort(Executor executor), must also release all resources and mark the connection closed as Connection.close() would.

The PR fixes the same by managing resource cleanup separately in a common internal method.

@cheenamalhotra cheenamalhotra added this to the 7.3.0 milestone Mar 12, 2019
@codecov-io
Copy link

codecov-io commented Mar 12, 2019

Codecov Report

Merging #983 into dev will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##                dev    #983      +/-   ##
===========================================
- Coverage     50.61%   50.6%   -0.02%     
+ Complexity     2921    2920       -1     
===========================================
  Files           120     120              
  Lines         27996   27995       -1     
  Branches       4681    4677       -4     
===========================================
- Hits          14170   14166       -4     
- Misses        11530   11535       +5     
+ Partials       2296    2294       -2
Flag Coverage Δ Complexity Δ
#JDBC42 50.11% <100%> (-0.04%) 2877 <6> (-1)
#JDBC43 50.5% <100%> (+0.01%) 2913 <6> (-3) ⬇️
Impacted Files Coverage Δ Complexity Δ
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 46.48% <100%> (+0.05%) 343 <6> (+1) ⬆️
...a/com/microsoft/sqlserver/jdbc/PLPInputStream.java 58.57% <0%> (-1.19%) 33% <0%> (-1%)
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 46.86% <0%> (-0.44%) 111% <0%> (-1%)
...n/java/com/microsoft/sqlserver/jdbc/Parameter.java 67.13% <0%> (-0.21%) 64% <0%> (ø)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 55.61% <0%> (-0.14%) 0% <0%> (ø)
...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java 39% <0%> (+0.43%) 43% <0%> (ø) ⬇️
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 62.5% <0%> (+0.43%) 91% <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 78efb57...9dbda5f. Read the comment docs.

peterbae
peterbae previously approved these changes Mar 12, 2019
@cheenamalhotra cheenamalhotra merged commit 408b614 into microsoft:dev Mar 13, 2019
@cheenamalhotra cheenamalhotra deleted the connectionAbort branch March 14, 2019 19:15
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.

6 participants