-
Notifications
You must be signed in to change notification settings - Fork 426
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
The driver connects to the wrong SQLServer host #1964
Labels
Bug
A bug in the driver. A high priority item that one can expect to be addressed quickly.
Milestone
Comments
mmimica
pushed a commit
to mmimica/mssql-jdbc
that referenced
this issue
Nov 11, 2022
…d each time anyway.
Hi @mmimica, Thank you, we'll take a look into both the issue and the potential fix. |
lilgreenbird
added
the
Bug
A bug in the driver. A high priority item that one can expect to be addressed quickly.
label
Dec 14, 2022
tkyc
pushed a commit
that referenced
this issue
Dec 14, 2022
* Merge dev to master for 9.2.0 release (#1506) Merge dev to master for 9.2.0 release (#1506) * fix merge * Fix #1964 by not having a static field at all. It was cleared each time anyway. * refactor a bit Co-authored-by: ulvii <v-ulibra@microsoft.com> Co-authored-by: Peter Bae <v-hyba@microsoft.com> Co-authored-by: Milan Mimica <milan.mimica@infobip.com>
tkyc
pushed a commit
that referenced
this issue
Dec 14, 2022
* Merge dev to master for 9.2.0 release (#1506) Merge dev to master for 9.2.0 release (#1506) * fix merge * Fix #1964 by not having a static field at all. It was cleared each time anyway. * refactor a bit Co-authored-by: ulvii <v-ulibra@microsoft.com> Co-authored-by: Peter Bae <v-hyba@microsoft.com> Co-authored-by: Milan Mimica <milan.mimica@infobip.com>
tkyc
pushed a commit
that referenced
this issue
Dec 28, 2022
* Merge dev to master for 9.2.0 release (#1506) Merge dev to master for 9.2.0 release (#1506) * fix merge * Fix #1964 by not having a static field at all. It was cleared each time anyway. * refactor a bit Co-authored-by: ulvii <v-ulibra@microsoft.com> Co-authored-by: Peter Bae <v-hyba@microsoft.com> Co-authored-by: Milan Mimica <milan.mimica@infobip.com>
tkyc
pushed a commit
that referenced
this issue
Dec 29, 2022
* Merge dev to master for 9.2.0 release (#1506) Merge dev to master for 9.2.0 release (#1506) * fix merge * Fix #1964 by not having a static field at all. It was cleared each time anyway. * refactor a bit Co-authored-by: ulvii <v-ulibra@microsoft.com> Co-authored-by: Peter Bae <v-hyba@microsoft.com> Co-authored-by: Milan Mimica <milan.mimica@infobip.com>
tkyc
added a commit
that referenced
this issue
Dec 29, 2022
* Merge dev to master for 9.2.0 release (#1506) Merge dev to master for 9.2.0 release (#1506) * fix merge * Fix #1964 by not having a static field at all. It was cleared each time anyway. * refactor a bit Co-authored-by: ulvii <v-ulibra@microsoft.com> Co-authored-by: Peter Bae <v-hyba@microsoft.com> Co-authored-by: Milan Mimica <milan.mimica@infobip.com> Co-authored-by: Milan Mimica <milan.mimica@gmail.com> Co-authored-by: ulvii <v-ulibra@microsoft.com> Co-authored-by: Peter Bae <v-hyba@microsoft.com> Co-authored-by: Milan Mimica <milan.mimica@infobip.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Driver version
11.2.1
Client Operating System
Linux
Problem description
When the database driver is used to connect to different SQLServer hosts, it can happen that the TCP connection is established to the wrong host. This is due to a race-condition in
com.microsoft.sqlserver.jdbc.SocketFinder#getSocketByIPPreference
. The change was introduced in #1766.com.microsoft.sqlserver.jdbc.SocketFinder#addressList is
static
, and this state is shared across allSQLServerConnection
instances, even if connected to different SQLServer hosts. A race-condition when mutating this state incom.microsoft.sqlserver.jdbc.SocketFinder#getSocketByIPPreference
can lead to the socked being connected to an unexpected host.The text was updated successfully, but these errors were encountered: