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

[SPARK-46660][CONNECT] ReattachExecute requests updates aliveness of SessionHolder #44670

Closed
wants to merge 6 commits into from

Conversation

vicennial
Copy link
Contributor

@vicennial vicennial commented Jan 10, 2024

What changes were proposed in this pull request?

This PR makes SparkConnectReattachExecuteHandler fetch the ExecuteHolder via theSessionHolder which in turn refreshes it's aliveness. Further, this makes it consistent with SparkConnectReleaseExecuteHandler.

Why are the changes needed?

Currently in ReattachExecute, we fetch the ExecuteHolder directly without going through the SessionHolder and hence the "aliveness" of the SessionHolder is not refreshed.

This would result in long-running queries (which do not send ReleaseExecute requests in specific) failing because the SessionHolder would expire from the cache during an active query execution.

Does this PR introduce any user-facing change?

Yes, it fixes the bug where long-running may fail when their corresponding SessionHolder is expired during active query execution.

How was this patch tested?

New unit test.

Was this patch authored or co-authored using generative AI tooling?

No.

@juliuszsompolski
Copy link
Contributor

Further, this makes it consistent with SparkConnectReattachExecuteHandler.

You mean ReleaseExecute handler?

Copy link
Contributor

@juliuszsompolski juliuszsompolski left a comment

Choose a reason for hiding this comment

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

LGTM with nits

@HyukjinKwon
Copy link
Member

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants