nsivabalan opened a new pull request, #13976:
URL: https://github.com/apache/hudi/pull/13976

   ### Describe the issue this Pull Request addresses
   
   With streaming mdt writes, when we write to mdt table, we see that total 
tasks spun up = number of dt tasks + number of mdt write tasks. But the 
previous stage, already would have executed dt tasks, but since we union both 
and trigger `collect()`, spark spins up N+M tasks where N tasks mapping to data 
table tasks are a no-op. So, we are coalescing entire data table writeStatus 
rdd to `1` so that writes to metadata table are not impacted w/ the number of 
data table write tasks. If. not, chances that spark might schedule all mdt 
write tasks in same executor resulting in memory pressure for very high 
ingestion workloads like 50M+ records. 
   
   Spark stages UI w/o the fix: 
   <img width="1777" height="669" alt="image (20)" 
src="https://github.com/user-attachments/assets/d0081fc8-5e6a-4865-8d08-27ba17853def";
 />
   
   <img width="1764" height="824" alt="image (21)" 
src="https://github.com/user-attachments/assets/3621ac8f-105f-4bc2-a473-1bb599793670";
 />
   
   After the fix: 
   check for stage 31 which only has 11 tasks. 10 for RLI and 1 for the data 
table writeStatuses which we coalesced. 
   
   <img width="1773" height="585" alt="image" 
src="https://github.com/user-attachments/assets/11ef62cc-0143-4a6e-a1d5-6428a2c990f6";
 />
   
   <img width="1773" height="716" alt="image" 
src="https://github.com/user-attachments/assets/c3ab63d8-c43d-453e-acca-06860aa0fe68";
 />
   
   
   
   ### Summary and Changelog
   
   <!-- Short, plain-English summary of what users gain or what changed in 
behavior.
        Followed by a detailed log of all the changes. Highlight if any code 
was copied. -->
   
   ### Impact
   
   <!-- Describe any public API or user-facing feature change or any 
performance impact. -->
   
   ### Risk Level
   
   <!-- Accepted values: none, low, medium or high. Other than `none`, explain 
the risk.
        If medium or high, explain what verification was done to mitigate the 
risks. -->
   
   ### Documentation Update
   
   <!-- Describe any necessary documentation update if there is any new 
feature, config, or user-facing change. If not, put "none".
   
   - The config description must be updated if new configs are added or the 
default value of the configs are changed.
   - Any new feature or user-facing change requires updating the Hudi website. 
Please follow the 
     [instruction](https://hudi.apache.org/contribute/developer-setup#website) 
to make changes to the website. -->
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to