BigQuery error · DML and concurrency
Could not serialize access to table due to concurrent update
Two mutating DML statements (UPDATE, DELETE or MERGE) tried to change the same partition of a table at the same time. The first to commit wins and the other fails. Retry the loser after the other job finishes, partition the table so jobs touch different partitions, or run the writers one after another.
The error message
Could not serialize access to table <project>:<dataset>.<table> due to concurrent update
Causes
Concurrent DML on the same partition
BigQuery lets mutating DML statements run concurrently on a table as long as they modify different partitions. If two touch the same partition, or the table is unpartitioned, the second to commit fails. BigQuery already retries a failed statement up to three times before returning this error.
A statement that matches zero rows still conflicts
An UPDATE, DELETE or MERGE acquires locks on the partitions it targets even when its filter ends up matching nothing, so a no-op cleanup job can still collide with a real update.
Truncation, partition expiration or transactions
A TRUNCATE TABLE while DML runs, background partition expiration on the partitions being modified, or a multi-statement transaction (which locks the whole table) can all cause the conflict.
Related wording
Inside multi-statement transactions the message is Transaction is aborted due to concurrent update against table <table>. Both return HTTP 400 with reason invalidQuery.
How to fix it
1. Find the job that won
List mutating statements on the table that overlapped the failed job's run time.
SELECT job_id, user_email, statement_type, start_time, end_time, query
FROM `region-us`.INFORMATION_SCHEMA.JOBS
WHERE creation_time > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY)
AND destination_table.dataset_id = 'sales'
AND destination_table.table_id = 'orders'
AND statement_type IN ('UPDATE', 'DELETE', 'MERGE')
ORDER BY start_time;2. Retry after the conflicting job
If the overlap was occasional, retry with exponential backoff. Make the statement idempotent first (MERGE on a key, DELETE by key) so a retry can't apply a change twice.
3. Partition so writers touch different partitions
Jobs that update different dates of a date-partitioned table don't conflict. Filter on the partitioning column in each statement so BigQuery only locks the partitions it needs.
UPDATE `project.sales.orders`
SET status = 'shipped'
WHERE order_date = '2026-11-22'
AND order_id IN (SELECT order_id FROM `project.staging.shipments`);4. Serialize writers to the same table
Make tasks that modify the same table depend on each other in the orchestrator, or merge them into one MERGE that handles all changes in one statement.
How to prevent it
- Give each table one writer at a time, and schedule cleanup DELETEs away from load and merge windows.
- If you use partition expiration, schedule DML outside the time partitions expire.
- Count the cost of retries: on-demand, a failed statement isn't billed, but every statement that does succeed bills its own bytes plus the partitions it rewrites, so many small conflicting updates cost more than one batched MERGE.
FAQ
Do INSERT statements cause this error?
No. An INSERT doesn't conflict with other concurrent DML, and a MERGE that only inserts rows doesn't conflict either.
Why do I get it on a table nobody else writes to?
Look for your own overlapping jobs (two runs of the same schedule), a cleanup job matching zero rows, partition expiration, or a multi-statement transaction left open in a session.
Is this the same as "Too many DML statements outstanding"?
No. That error means the per-table queue of 20 waiting statements is full. This one means two statements ran at the same time and collided. See too many DML statements outstanding.
Related
SQL reference
All BigQuery error messages · What 50M daily events say about BigQuery failures
