apache / apache/paimon

[Bug] Parallelism cannot be controlled in `remove_orphan_files`

Open
#7,155 1 comment 0 reactions 0 assignees View on GitHub
bug
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.

### Paimon version

1.3.1

### Compute Engine

flink 1.20.3

### Minimal reproduce step

```sql
CALL sys.remove_orphan_files(`table` => 'ods_mms_db.*', older_than => '2026-01-29 10:00:00', parallelism => 10, dryRun => true);
```
The database contains more than 600 tables.

### What doesn't meet your expectations?

The parallelism of the job should be 10.
The actual parallelism is much higher than 10, which will exhaust the cluster resources.

### Anything else?

_No response_

### Are you willing to submit a PR?

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the sys.remove_orphan_files procedure and reproduce the call against a database with more than 600 tables, using parallelism => 10 and dryRun => true. Trace how the procedure schedules work and verify that the resulting job parallelism is limited to 10 without exhausting cluster resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.