Forum Discussion
Async merge risk
- Anonymous1 year ago
Hi smpa01 ,
Thank you for reaching out to the Microsoft Fabric Community Forum.
When merging multiple independent tables asynchronously from Bronze (non-Lakehouse) to Silver (Lakehouse Delta), and assuming no cross-table dependencies, the pattern is generally safe but there are still some risks and practical considerations to be consider.
Even if the tables are fully independent, running multiple merge operations at the same time can cause some problems. Each merge uses system resources like CPU, memory, and input/output (IO), so if you run many merges together, especially on a smaller cluster, it can slow down performance or even cause jobs to fail.
Also, if all the merge operations are reading from or writing to the same storage system as ADLS or One Lake, it can create IO bottlenecks or hit bandwidth limits, particularly when dealing with large volumes of data. Merge operations also involve internal processing (called shuffling), which uses a lot of memory. If too many such processes run at once, it can lead to memory issues or spill data to disk, which slows things down.
Lastly, when running merges asynchronously (in parallel), it becomes harder to catch errors. If one merge fails, you may not notice it unless you specifically check or handle it in your code.
So, while this pattern is supported and commonly used, it’s important to control the number of concurrent merges, monitor your cluster performance, and handle errors properly to avoid performance or reliability issues.
Hope this helps. Please reach out for further assistance.
Thank you.
Hi AndreyBear ,
To clarify my earlier point when I referred to “asynchronous,” I meant situations where merge operations are started in parallel from different execution contexts, such as separate notebooks or pipeline activities, allowing them to run simultaneously at the capacity level.
You’re correct that within a single notebook, Spark schedules these merge operations one after another at the driver side, even if the code is non-blocking. Also, concurrent writes to the same table partition cause file-level lock conflicts, but writing to separate tables stays isolated at the Delta transaction level.
Thank you for highlighting this distinction, as it helps others understand how execution works in Fabric.