Skip to content

UnknownHostException Retry issue in BigQueryImpl > getTable #2290

@satishnagc

Description

@satishnagc

Hello,

The getTable call in BigQueryImpl has a provision to send in ExceptionHandler ( BigQueryBaseService.BIGQUERY_EXCEPTION_HANDLER) for runWithRetries.

  1. The problem is when the underlying call - bigQueryRpc.getTable throws an UnknownHostException, it is translated to BigQueryException.
  2. The exception handler config + Bigquery Retry Config+ Timed execution are checked for shouldRetry in BigQueryRetryAlgorithm.
  3. shouldRetryBasedOnResult in BigQueryRetryAlgorithm evaluates the com.google.cloud.ExceptionHandler > shouldRetry > findMostSpecificRetryInfo, the check is current.exception.isAssignableFrom(exception) - This Fails for BigQueryException and Config .retryOn(java.net.UnknownHostException.class)

Thus the UnknownHostException retries are discarded.

I tried a unit test from my local machine and simulated the UnknownHostException by disconnecting the wifi.

Let me know if i missed something or this is a valid issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigqueryIssues related to the googleapis/java-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions