wg1026688210 opened a new issue, #1245: URL: https://github.com/apache/incubator-paimon/issues/1245
### Search before asking - [X] I searched in the [issues](https://github.com/apache/incubator-paimon/issues) and found nothing similar. ### Motivation Due to the current limitation of manifest supporting partial merging, Some Delete type ManifestEntrys cannot be applied to the ADD type ManifestEntrys, resulting in the problem of data inflation in the ManifestEntry of the Paimon table. This issue will discuss the introduction of fullCompaction mechanism for manifest to solve this problem. ### Solution We divide the Manifest File into two layers: Base and Delta . ### The logic of Dividing layers  Assuming the target size for merging is 8MB.Firstly, we sequentially traverse the Manifest file List. When we find the first Manifest that contains a Delete Entry or has a file size smaller than the target size, this Manifest and all the following Manifests belong to the Delta layer, while the Manifests before this one belong to the Base layer.  In this picture, we will see that : - Base (indicated by the orange box in the figure): Include the Manifest file (hereinafter `target ADD` ) only contains ADD type ManifestEntry, and the size of file is larger than the target size , which don't need to be merged if there is no DELETE Entry to apply . - Delta (indicated by the red box in the figure): Include the Manifest file only contains ADD type ManifestEntry which file size is smaller than the target size or the file container DELETE type ManifestEntry ,also possibly include the the `target ADD`. ### Apply DELETE To The Base Lay  Firstly, we merge the Delta layer to reduce the file size of the Base layer. The remaining DELETE Entries after merging are the effective DELETE. Then, we calculate which partitions are affected by the DELETE. Next, we traverse the Base layer and find the first Manifest file that contains the affected partition. All the following Manifest files are split into a new layer called Base', which needs to be merged with the Delta layer to eliminate all DELETE files. The Base files other than the file of Base' will not participate in this FullCompaction process.  ### Anything else? _No response_ ### Are you willing to submit a PR? - [X] 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]
