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

Utility of DataReaderDisposing logging/interception #24295

Closed
roji opened this issue Feb 27, 2021 · 3 comments
Closed

Utility of DataReaderDisposing logging/interception #24295

roji opened this issue Feb 27, 2021 · 3 comments

Comments

@roji
Copy link
Member

roji commented Feb 27, 2021

RelationalDataReader has a logging/interception hook for disposing - but not for closing the reader (which happens just before). there's very little difference between a closed and disposed reader - both states are almost the same since the reader cannot be reused (unlike connection for example). Also, any I/O would very likely occur during Close, which is where we don't log the elapsed time etc.

Do we know if/how users are using this? Should we make DataReaderDisposing include Close as well, so that users can skip that via interceptors, and so that its time is logged too?

/cc @ajcvickers

@smitpatel
Copy link
Member

You can only read out parameter values after reader is closed but before it is disposed.

@ajcvickers
Copy link
Member

Backlogging to add Close interception.

@ajcvickers
Copy link
Member

Closing this in favor of #23535, since the same event covers both cases.

@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2022
@ajcvickers ajcvickers removed this from the Backlog milestone Jun 21, 2022
ajcvickers added a commit that referenced this issue Jun 21, 2022
Part of #626
Fixes #23535

Also added tests to:
 - Show that this can be used to get statistics from a query, as requested in #23535.
 - Show that Close and/or Dispose can be suppressed, as requested in #24295.
ajcvickers added a commit that referenced this issue Jun 23, 2022
Part of #626
Fixes #23535

Also added tests to:
 - Show that this can be used to get statistics from a query, as requested in #23535.
 - Show that Close and/or Dispose can be suppressed, as requested in #24295.
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants