Skip to content

#7105 Trace when query is done. This is needed in order to get Select… - #7106

Merged
anpete merged 1 commit into
dotnet:devfrom
fitzchak:7105
Nov 30, 2016
Merged

anpete merged 1 commit into
dotnet:devfrom
fitzchak:7105

Conversation

@fitzchak

Copy link
Copy Markdown

Fix #7105

@dnfclas

dnfclas commented Nov 23, 2016

Copy link
Copy Markdown

Hi @fitzchak, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@fitzchak

fitzchak commented Nov 29, 2016 •

Copy link
Copy Markdown
Author

@anpete I applied requested changes.

[NotNull] DbCommand command,
[NotNull] DbDataReader reader)
[NotNull] DbDataReader reader,
[NotNull] DiagnosticSource diagnosticSource)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Check.NotNull

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

connection,
dbCommand,
dbCommand.ExecuteReader());
dbCommand.ExecuteReader(), DiagnosticSource);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move arg to newline.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

{
if (!_disposed)
{
_diagnosticSource.WriteDataReaderDisposed(this);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we are firing the event before disposing the underlying reader, which is probably more useful anyway. I think we should tweak the event name to reflect that. I.e. "Disposing" instead of "Disposed".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you actually need the reader instance for your use case?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we need it before the disposing. So I changed the name to "Disposing".
Also we need just the instance of DbDataReader, which has the command with the statistics and the connection. So I changed this also to send just the DbDataReader.

…SelectRows statistics. Take dotnet#2: Use the DiagnosticSource on RelationalDataReader. Take dotnet#3: Fix requested changes.
@fitzchak

Copy link
Copy Markdown
Author

I amended the commit with the requested changes.

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.

3 participants