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

Fix Rows are not present when job not completed yet. #54

Merged
merged 3 commits into from
Feb 19, 2023
Merged

Conversation

alu
Copy link
Contributor

@alu alu commented Feb 15, 2023

I seen panic with Rows are not present when execute large query.

src/job.rs Outdated
max_results: page_size,
location: Some(location.to_string()),
..Default::default()
},
)
.await?;

// Waiting for completed the job.
if !qr.job_complete.unwrap_or(false) {
tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
Copy link
Owner

Choose a reason for hiding this comment

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

It's probably best to reduce this a bit, as it will add a second of latency even for small to medium sized jobs. I don't know if BigQuery provides any guidance on this, but I would suggest something like 200ms.

Copy link
Contributor Author

@alu alu Feb 15, 2023

Choose a reason for hiding this comment

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

Thank you for review. Change to 200ms.
I think best solution is specify delay by user but it makes breaking changes.

@lquerel lquerel merged commit 5ea1fea into lquerel:main Feb 19, 2023
@lquerel
Copy link
Owner

lquerel commented Feb 19, 2023

I'm not sure when I will be able to push a new version on crates.io. I'm on vacation for the week with an intermittent internet connection. I will do my best. Thanks for this PR.

@lquerel
Copy link
Owner

lquerel commented Mar 6, 2023

Sorry for the delay. Your fix is now published on crates.io. Thanks again.

LawnGnome added a commit to LawnGnome/gcp-bigquery-client that referenced this pull request Sep 26, 2023
LawnGnome added a commit to LawnGnome/gcp-bigquery-client that referenced this pull request Sep 26, 2023
lquerel pushed a commit that referenced this pull request Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants