apache / apache/paimon

[Feature] Add empty commit options to support some situation

Open
#4,422 0 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

In some special cases, there maybe exists a situation that the CommitMessage is not empty but all the table files in it are empty, and if the job failover because of conflict, the job will be unrecoverable since the value of numCommitted will be greater than 1, so the job will failover infinite and can't be restore.

The exception is "This exception is intentionally thrown after committing the restored checkpoints. By restarting the job we hope that writers can start writing based on these new commits".

### Solution

We can add an core options such as 'commit.ignore-empty-commit' to support commit an empty snapshot, and then we can restore the job normally.

### 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 tracing the commit and checkpoint-recovery handling described through CommitMessage, numCommitted, and restored checkpoints; the issue does not name files or tests. Determine where a commit option belongs and verify that a commit with no table files can recover normally without infinite failover.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.