qifanzhang-ms commented on code in PR #2810:
URL: https://github.com/apache/arrow-adbc/pull/2810#discussion_r2084908535
##########
csharp/src/Drivers/BigQuery/BigQueryStatement.cs:
##########
@@ -93,27 +93,8 @@ private async Task<QueryResult> ExecuteQueryInternalAsync()
getQueryResultsOptions.Timeout = TimeSpan.FromSeconds(seconds);
}
- Func<Task<BigQueryJob>> checkJobStatus = async () =>
- {
- while (true)
- {
- var jobWithStatus = await Client.GetJobAsync(jobReference);
-
- if (jobWithStatus.State == JobState.Done)
- {
- if (jobWithStatus.Status.ErrorResult != null)
- {
- // TODO: log
- Debug.WriteLine($"Error:
{jobWithStatus.Status.ErrorResult.Message}");
- }
-
- return jobWithStatus;
- }
- }
- };
-
- await ExecuteWithRetriesAsync<BigQueryJob>(checkJobStatus);
-
+ // We can't checkJobStatus, Otherwise, the timeout in
QueryResultsOptions is meaningless.
Review Comment:
The change in timeout behavior is caused by this commit:
[feat(csharp/src/Drivers/BigQuery): Add support for AAD/Entra authenti… ·
apache/arrow-adbc@5aa9f1e](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Farrow-adbc%2Fcommit%2F5aa9f1ea60984c09defdc8d8746db9e2f5bd8b98&data=05%7C02%7Cqifanzhang%40microsoft.com%7Ca78e3e82eb70423605f908dd8e42b259%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638823139323718893%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=p2sZ2%2BoXz8h%2BdTu0lmQKMogc06NJAcjg5LTV1rI2oP0%3D&reserved=0).
Let me explain the changes before and after this commit based on my
understanding. **In the previous timeout feature, it was completely specified
by the timeout parameter in QueryResultOptions** (default is five minutes, if
the job is not completed after 5 minutes, it will prompt timeout), but
customers can freely set it (such as setting timeout after 1 minute, timeout
after 15 minutes, etc.). But after the modification, it became **a constant
wait and completely uncontrollable**.
I don't think it's necessary to add relevant logic in while true, because
**the official QueryResultOptions already has a timeout parameter to implement
this function**, and we have been using it before without encountering any
problems.
Of course, this is my viewpoint, and I look forward to your opinions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]