bigquery: address streaming error logic in storage sample
Noticed by an astute reader that we don't correctly break out
of the inner loop on error to restart a new streaming RPC call.
@@ -228,6 +228,9 @@ func processStream(ctx context.Context, client *bqStorage.BigQueryReadClient, st
if retries >= retryLimit {
return fmt.Errorf("processStream retries exhausted: %v", err)
}
+ // break the inner loop, and try to recover by starting a new streaming
+ // ReadRows call at the last known good offset.
+ break
}
rc := r.GetRowCount()
