-
Notifications
You must be signed in to change notification settings - Fork 161
feat(csharp/src/Drivers/Databricks): Fixes to heartbeat polling #2851
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
feat(csharp/src/Drivers/Databricks): Fixes to heartbeat polling #2851
Conversation
fe1fb11 to
f1dcafb
Compare
80b7725 to
a54830b
Compare
a54830b to
0d468e6
Compare
ca59bd0 to
446e97a
Compare
| /// This is used to maintain the command results and session when reading results takes a long time. | ||
| /// </summary> | ||
| internal class DatabricksOperationStatusPoller : IDisposable | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the client doesn't finish reading results, but does not call statement.Dispose() explicitly, this will keep polling continuously.
One (slight hacky solution) could be to use a WeakReference to the DatabricksStatement or BaseDatabricksReader to end polling after Garbage disposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding this as a kind of "Known Issues" in the readme.md.
446e97a to
8ada32f
Compare
d856e9c to
3c7bb78
Compare
3c7bb78 to
ca395a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks; looks good!
DatabricksOperationStatusPollerwas interleaving calls withCloudFetchResultFetcher. Since they both share the underlying transport and protocol to perform this operation (andTTransportis not thread-safe), it resulted in race conditions between status polling and result fetching.This PR fixes this by adding a ThreadSafeClient to classes sharing a connection/protocol/transport. This PR should not affect Impala's client
Testing
Ran CloudFetchE2Etests, passes on this branch (fails on main)