wg1026688210 opened a new issue, #1391:
URL: https://github.com/apache/incubator-paimon/issues/1391

   ### Search before asking
   
   - [X] I searched in the 
[issues](https://github.com/apache/incubator-paimon/issues) and found nothing 
similar.
   
   
   ### Motivation
   
   Currently, there is a scenario that can lead to an excessive number of L0 
files.
   
   1. During the write phash :
        For the reason of using Spillable WriterBuffer or data size is smaller 
than the size of WriterBuffer , there is no SortedRun flushed.
   
   2. During the PrepareCommit phase:
       the MergeTreeWriter Flush WriterBuffer to L0 File and  trigger an 
asynchronous compaction, and the compaction is not be waited. This may lead to 
a situation that the newly added files are successfully committed and 
compaction is fail to commit for Flink task restart. 
   
   3. The same scenario is repeated in the next Flink task restore, causing an 
increasing number of L0 files and all merges to fail.
   
   
   
   
   ### Solution
   
   We can wait until the asynchronous merge is completed at  PrepareCommit 
phase  If there are too many SortedRuns.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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