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 ConnectionTime and ClientConnectionId reported by SqlStatistics #341

Merged
merged 6 commits into from
Dec 5, 2019

Conversation

yukiwongky
Copy link
Contributor

Before the change, the ConnectionTime is reported as MaxValue/1000 because the _closeTimestamp was not set properly. Further, calling RetrieveStatistics multiple times causes the ConnectionTime to increase exponentially because the total connection time was SafeAdded to the previously saves _connectionTime. The _connectionTime should be overwritten instead.

Before the change, when the connection is closed, the ClientConnectionId is set to empty and it's unavailable to the user. The new change allows the user to access the ClientConnectionId even after the connection is closed.

@yukiwongky yukiwongky merged commit 6ade367 into dotnet:master Dec 5, 2019
@cheenamalhotra cheenamalhotra added this to the 2.0.0-preview1 milestone Dec 11, 2019
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.

2 participants