Repository navigation
Conversation
…y and timeout settings
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive Javadoc documentation to BigQueryOptions and BigQueryRetryConfig to clarify configuration options, retry behaviors, and transport settings. Feedback on the changes highlights a potential inaccuracy in the Javadoc for retryOnRegEx, which states that matching is case-insensitive but references Pattern.matches (which is case-sensitive by default). Clarification is requested to ensure the documentation accurately reflects the underlying implementation.
| * Adds regular expression patterns to retry on. Matching is case-insensitive and requires a | ||
| * full-string match via {@link java.util.regex.Pattern#matches(String, CharSequence)}, so | ||
| * patterns must match the entire error message rather than only a substring (for example, | ||
| * {@code ".*rate limit.*"} rather than {@code "rate limit"}). |
There was a problem hiding this comment.
The Javadoc states that matching is case-insensitive and requires a full-string match via Pattern.matches(String, CharSequence). However, Pattern.matches is case-sensitive by default. If the underlying implementation compiles the pattern with Pattern.CASE_INSENSITIVE, it does not use Pattern.matches directly. Please clarify whether the matching is indeed case-insensitive and correct the reference to Pattern.matches if a custom compiled Pattern is used instead.
References
- Update stale Javadoc comments to reflect new method behavior for improved clarity, rather than removing them.
Documents the retry and timeout configuration entry points on
BigQueryOptionsandBigQueryRetryConfig:BigQueryOptionsdistinguishing overall retry bounds (Builder.setRetrySettings) from per-attempt HTTP connect and read timeouts (Builder.setTransportOptions(HttpTransportOptions), 60-second default read timeout viagetDefaultHttpTransportOptions()).Builder.setTransportOptions,Builder.setResultRetryAlgorithm(including default retry behavior and linkingBigQueryException#isRetryable()), andgetDefaultHttpTransportOptions().BigQueryRetryConfigand its builder methods, explaining why message-based retries exist (BigQuery returns transient failures like rate limits with non-5xx codes such as 403 or 400 or in job error payloads), clarifying its scope (job creation for all job types viaJobOption.bigQueryRetryConfig(...)and query job status polling viaJob.waitFor(BigQueryRetryConfig, RetryOption...), ignored for non-query jobs inwaitFor), and clarifying case-insensitive substring matching (retryOnMessage) vs. lowercased full-string regex matching (retryOnRegEx).Verified with
mvn fmt:check,checkstyle:check@checkstyle,test-compile, andjavadoc -Xdoclint:syntax,html,reference(zero new warnings).