apache / apache/paimon

[Feature] Correct the out-of-order of data during one checkpoint

Open
#2,778 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/incubator-paimon/issues) and found nothing similar.

### Motivation

Paimon is already able to correct the disorder of data by specifying `sequence.field` to determine the order of updates. It's suitable for those cdc ingestion from business directly, which means that the business data update always triggers the update of `sequence.field`.

If your ingestion for Paimon table is based on the complex Flink cascade join, and the `sequence.field` comes from the left table. The join operator may generate many -U(-D), +U(+I) messages, which won't trigger the update for `sequence.field` at all, so there may be lots of -U(-D), +U(+I) messages with the same `sequence.field`, data disorder still can't be corrected even with the sequence auto padding.

Paimon can correct the disorder of data during a checkpoint when committing, like what `SinkUpsertMaterialize` node do, but do not rely on the state to do this.

### Solution

_No response_

### 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 examining the SinkUpsertMaterialize node and the checkpoint commit path mentioned in the issue. Determine how out-of-order updates could be corrected during a checkpoint without relying on state, then define tests covering the cascade-join update sequence and verify the committed data order.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
stream-processing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.