apache / apache/paimon

[Feature] Support periodically refresh existing dataFileMetas in CompactManager

Open
#5,213 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
3.4k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
396

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.

### Motivation

It is very usual user will use a streaming job and a batch job to update different columns of the same paimon table. User can choose to configure the batch job as write-only or streaming job as write-only to avoid conflict.

In either way, the write and compact job will not receive the new files generated by write-only job. This will lead to insufficient compaction both for MergeTreeCompactManager and BucketedAppendCompactManager.

This issue could be addressed by supporting periodically refresh dataFileMetas in CompactManager.

By doing this, there is no need to introduce an extra dedicated compaction job.

### Solution

Same solution like the refreshFiles in LocalTableQuery

### Anything else?

_No response_

### Are you willing to submit a PR?

- [x] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading CompactManager and the refreshFiles approach in LocalTableQuery. Trace how MergeTreeCompactManager and BucketedAppendCompactManager obtain dataFileMetas, then determine where periodic refreshing belongs. Done means both managers can discover files produced by a separate write-only job and perform sufficient compaction without a dedicated compaction job.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.