Skip to content

Fixed Idle Connection recovery so that unprocessedResponseCount isn't over decremented#1989

Merged
tkyc merged 6 commits intomainfrom
ICR-unprocessed-reponse-count-fix
Dec 13, 2022
Merged

Fixed Idle Connection recovery so that unprocessedResponseCount isn't over decremented#1989
tkyc merged 6 commits intomainfrom
ICR-unprocessed-reponse-count-fix

Conversation

@tkyc
Copy link
Copy Markdown
Contributor

@tkyc tkyc commented Dec 5, 2022

The unprocessedResponseCount needs to be decremented only when doneToken.isFinal is true.

Fixes #1971 also.

Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResultSet.java Outdated
@lilgreenbird lilgreenbird changed the title Fixed ICR recovery so that unprocessedResponseCount isn't over decremented Fixed Idle Connection recovery so that unprocessedResponseCount isn't over decremented Dec 6, 2022
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/resiliency/BasicConnectionTest.java Outdated
@tkyc tkyc force-pushed the ICR-unprocessed-reponse-count-fix branch from 5fca34a to 7f170e0 Compare December 6, 2022 16:57
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResultSet.java
lilgreenbird
lilgreenbird previously approved these changes Dec 13, 2022
Jeffery-Wasty
Jeffery-Wasty previously approved these changes Dec 13, 2022
@tkyc tkyc merged commit fd16cb8 into main Dec 13, 2022
@tkyc tkyc deleted the ICR-unprocessed-reponse-count-fix branch December 13, 2022 19:01
tkyc added a commit that referenced this pull request Dec 14, 2022
… over decremented (#1989)

* Updated onDone with reason/comment for unecessary decrement for future reference

* Added more ICR tests

* Added missing brackets

* Test table names needed to be unique

* Drop tables within test if exist

Co-authored-by: lilgreenbird <[email protected]>
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.

SQLServerPreparedStatement uses a wrong handle after server restart - may cause wrong/dangerous statement execution

3 participants