Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix : Unable to poll results in async API#515

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@jprakash-db
Copy link
Contributor

@jprakash-dbjprakash-db commentedFeb 25, 2025
edited
Loading

Description

Polling using the async API returned theRESOURCE_NOT_FOUND error for async executed queries

Fix

Force retention of data on the server side by not returning the results in thedirect results within theexecute_query response

Testing

Added e2e tests

# For async operation we don't want the direct results
getDirectResults=ttypes.TSparkGetDirectResults(
maxRows=max_rows,maxBytes=max_bytes
maxRows=0ifasync_opelsemax_rows,
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of setting maxRows as 0, I would recommend not specifying the direct result object in the request altogether. This is to make the intention clear of not expecting the direct results.

samikshya-db reacted with rocket emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Have made the object None

Comment on lines +902 to 907
getDirectResults=None
ifasync_op
elsettypes.TSparkGetDirectResults(
maxRows=max_rows,
maxBytes=max_bytes,
),
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have a linter for python driver yet? if not, could you please open an issue to community or internally?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@jayantsing-db I can raise a new PR for that

withself.cursor()ascursor:
whileduration<min_duration:
assertscale_factor<512,"Detected infinite loop"
assertscale_factor<1024,"Detected infinite loop"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain this change?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

For long running queries the previous upper limit of scale factor was not sufficient to run queries for atleast 5 minutes, hence increased it

samikshya-db reacted with thumbs up emoji
@jprakash-dbjprakash-db merged commitfb3e32c intorelease/v3.7.3Feb 28, 2025
2 of 3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@samikshya-dbsamikshya-dbsamikshya-db approved these changes

@rcypher-databricksrcypher-databricksAwaiting requested review from rcypher-databricksrcypher-databricks is a code owner

@yunbodeng-dbyunbodeng-dbAwaiting requested review from yunbodeng-dbyunbodeng-db is a code owner

@andrefurlan-dbandrefurlan-dbAwaiting requested review from andrefurlan-dbandrefurlan-db is a code owner

@jackyhu-dbjackyhu-dbAwaiting requested review from jackyhu-dbjackyhu-db is a code owner

@benc-dbbenc-dbAwaiting requested review from benc-dbbenc-db is a code owner

@jayantsing-dbjayantsing-dbAwaiting requested review from jayantsing-db

Assignees

@jprakash-dbjprakash-db

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@jprakash-db@samikshya-db@jayantsing-db

[8]ページ先頭

©2009-2025 Movatter.jp