feat(bigquery): handle duplicate job error with jobs.insert - #6799
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces handling for duplicate job errors during BigQuery query execution. When a duplicate job error is encountered, the client now attempts to adopt the existing job instead of failing. This is achieved by retrieving the existing job and checking its status. Additionally, the PR includes comprehensive unit tests to verify this new behavior. I have no further feedback to provide as there are no review comments.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6799 +/- ##
==========================================
- Coverage 97.03% 97.02% -0.01%
==========================================
Files 326 326
Lines 107511 107597 +86
==========================================
+ Hits 104322 104399 +77
- Misses 3189 3198 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A transport/io error can happen after query was inserted and RPC level retries might try to re-insert it with same job ID. Instead of re running the query, we can connect to the existing one to avoid running and billing a new query.
Towards #6218 #6717