feat(csharp/src/Drivers/Databricks): Fixes to heartbeat polling - #2851
Merged
CurtHagenlocher merged 5 commits intoMay 27, 2025
Merged
Conversation
toddmeng-db
force-pushed
the
toddmeng-db/polling-thread-safety
branch
2 times, most recently
from
May 23, 2025 00:08
fe1fb11 to
f1dcafb
Compare
toddmeng-db
force-pushed
the
toddmeng-db/polling-thread-safety
branch
2 times, most recently
from
May 23, 2025 00:47
80b7725 to
a54830b
Compare
toddmeng-db
force-pushed
the
toddmeng-db/polling-thread-safety
branch
from
May 23, 2025 01:57
a54830b to
0d468e6
Compare
toddmeng-db
commented
May 23, 2025
toddmeng-db
force-pushed
the
toddmeng-db/polling-thread-safety
branch
8 times, most recently
from
May 23, 2025 19:14
ca59bd0 to
446e97a
Compare
toddmeng-db
commented
May 23, 2025
| @@ -29,13 +29,13 @@ namespace Apache.Arrow.Adbc.Drivers.Databricks | |||
| /// </summary> | |||
| internal class DatabricksOperationStatusPoller : IDisposable | |||
| { | |||
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
Consider adding this as a kind of "Known Issues" in the readme.md.
toddmeng-db
force-pushed
the
toddmeng-db/polling-thread-safety
branch
from
May 23, 2025 19:27
446e97a to
8ada32f
Compare
toddmeng-db
force-pushed
the
toddmeng-db/polling-thread-safety
branch
from
May 23, 2025 22:37
d856e9c to
3c7bb78
Compare
toddmeng-db
force-pushed
the
toddmeng-db/polling-thread-safety
branch
from
May 23, 2025 22:38
3c7bb78 to
ca395a8
Compare
toddmeng-db
marked this pull request as ready for review
May 26, 2025 07:46
CurtHagenlocher
approved these changes
May 27, 2025
CurtHagenlocher
left a comment
Contributor
There was a problem hiding this comment.
Thanks; looks good!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)