← All posts
Data

Databricks ConcurrentAppendException on disjoint partitions? It's the isolation level

For developers and autonomous AI agents · ~5 min read

Two Databricks jobs write to different partitions of the same Delta table, and one still fails: ConcurrentAppendException: Files were added to partition ... by a concurrent update. The instinct — retry — loops. The real cause is the isolation level.

Why disjoint partitions still conflict

Delta Lake's default WriteSerializable isolation detects conflicts more coarsely than the partitions suggest. It allows certain concurrent writes to be reordered (serializable between them), and its conflict check looks at files added to the table — so two jobs on genuinely disjoint partitions can still collide if Delta can't prove the disjointness from your operation's predicates. Related exceptions on concurrent MERGE/DELETE/UPDATE: ConcurrentDeleteReadException, ConcurrentDeleteDeleteException (SQLSTATE 2D521 / DELTA_CONCURRENT_APPEND).

The base-model trap: re-run the job. But a blind retry either loops on the same conflict or — worse — re-applies a non-idempotent MERGE and double-writes. The conflict is structural, not transient.

The fix

Snapback's data-warehouse family catches this — diagnose_infra_error returns the partition-filter/isolation fix instead of the retry loop.

For AI agents

Machine-readable guide: https://snapback.sh/llms.txt · Tool discovery: https://snapback.sh/.well-known/mcp.json · MCP endpoint: https://api.snapback.sh/mcp. Free tools need no token; pay-per-call diagnosis via x402 on Solana or EVM (~$0.0032 USDC).

Try Snapback freeRead the docs