ConcurrentAppendException After Delta Table was enable Liquid Clustering and Row level concurrency
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 10:39 PM
Everytime I run parallel job it always failed with this error:
ConcurrentAppendException: Files were added to the root of the table by a concurrent update. Please try the operation again.
I did a lot of reseaches also create liquid clustering table and row level concurrency but it still failed.
Note: I can pass with retry method, but my boss doesn't like that approach. Does anyone can help me on this case?
Thanks you very much!
Please see detailt my table configuration in attachment picture.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 11:26 PM
Note: I tried both DBR 13.3.x and 14.3.x but still failed with same error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 12:46 PM
See this chart for a description of how row-level concurrency works. With row-level concurrency, concurrent merge operations still cannot safely modify the same row. Without row-level concurrency, concurrenty merge operations cannot safely modify the same partition.
Here are two strategies for handling this (there may be more):
- With each merge statement, ensure that you have a disjoint predicate to make sure that only one merge touches a swath of data at a given point in time. For example, we have a table that contains data for many global regions (AMER, EUROPE, ASIA) and we want to concurrently merge into this table. With merge 1, provide region = 'AMER' as an extra predicate. Merge 2, include region = 'EUROPE', etc.
- Union your operations together and avoid the concurrency issue altogether
Please be aware that target tables with identity columns enabled do not support concurrent operations, regardless of disjoint predicates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 07:52 PM - edited 11-26-2024 07:53 PM
Hi @cgrant,
Thanks for your checking, Could you please help me review on this?I also did the disjoint predicate here is my condition for merge,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 06:10 PM
What do the other merge commands look like?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 11:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 01:16 AM
Hi @cgrant,
Do you have any update on this? Thanks and very appreciate for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 12:55 PM
Thanks for sharing. In the original screenshots I've noticed that you've set delta.isolationLevel to Serializable, which is the strongest (and most strict) level. Please try WriteSerializable, which is the default level.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 12:37 AM
Hi @cgrant,
Yes, I just tried to change delta.isolationLevel to WriteSerilizable but still failed, please view my screentshoot

