You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "wwj6591812 (via GitHub)" <gi...@apache.org> on 2025/05/08 12:43:10 UTC
[PR] [Flink] Fix bug of redundant mark partition done [paimon]
wwj6591812 opened a new pull request, #5581:
URL: https://github.com/apache/paimon/pull/5581
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
In our production environment, we use Flink bound stream job write data to paimon table. We use the 'partition mark done' feature to make downstream knows that our Flink bound stream job has finished. But we found multi partition mark down will be trigger when :
1、some writer finished.
2、Failover.



After troubleshooting, we found the reason is when some wirte finish, follow code will be called:

Then when failover, the committer operator will mark partition done:

Finally, Our downstream started consuming before the Flink bound stream job was completely finished, resulting in data loss online.
So, we want add a parameter, when failover, don't partition mark down.
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Bug] Fix bug of redundant mark partition done [paimon]
Posted by "wwj6591812 (via GitHub)" <gi...@apache.org>.
wwj6591812 commented on PR #5581:
URL: https://github.com/apache/paimon/pull/5581#issuecomment-2900205333
> @wwj6591812 @leaves12138 During the normal process, PartitionMarkDone has not been completed yet. Even after restarting and restoring from state without notifying, it may result in some partitions being missed.
>
> I think adding option is the appropriate solution. Should we go to MarkPartitionDown when restoring the state.
@JingsongLi
Thanks, See https://github.com/apache/paimon/pull/5648
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Bug] Fix bug of redundant mark partition done [paimon]
Posted by "wwj6591812 (via GitHub)" <gi...@apache.org>.
wwj6591812 commented on code in PR #5581:
URL: https://github.com/apache/paimon/pull/5581#discussion_r2085913346
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/CommitterOperator.java:
##########
@@ -210,7 +210,7 @@ private void commitUpToCheckpoint(long checkpointId) throws Exception {
// So when `endInput` is called, we must check if the corresponding snapshot exists.
// However, if the snapshot does not exist, then append files must be new files. So
// there is no need to check for duplicated append files.
- committer.filterAndCommit(committables, false);
+ committer.filterAndCommit(committables, false, true);
Review Comment:
Thx, done.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Flink] Fix bug of redundant mark partition done [paimon]
Posted by "wwj6591812 (via GitHub)" <gi...@apache.org>.
wwj6591812 commented on PR #5581:
URL: https://github.com/apache/paimon/pull/5581#issuecomment-2866436486
I think no need UT, because CommitterOperatorTest#testFailIntentionallyAfterRestore and PartitionMarkDoneTest already cover my modify.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Bug] Fix bug of redundant mark partition done [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #5581:
URL: https://github.com/apache/paimon/pull/5581#issuecomment-2899728368
@wwj6591812 @leaves12138
During the normal process, PartitionMarkDone has not been completed yet. Even after restarting and restoring from state without notifying, it may result in some partitions being missed.
I think adding option is the appropriate solution. Should we go to MarkPartitionDown when restoring the state.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Flink] Fix bug of redundant mark partition done [paimon]
Posted by "wwj6591812 (via GitHub)" <gi...@apache.org>.
wwj6591812 commented on PR #5581:
URL: https://github.com/apache/paimon/pull/5581#issuecomment-2870712216
@JingsongLi Hi,Please CC,thx.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Bug] Fix bug of redundant mark partition done [paimon]
Posted by "leaves12138 (via GitHub)" <gi...@apache.org>.
leaves12138 commented on code in PR #5581:
URL: https://github.com/apache/paimon/pull/5581#discussion_r2085794133
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/CommitterOperator.java:
##########
@@ -210,7 +210,7 @@ private void commitUpToCheckpoint(long checkpointId) throws Exception {
// So when `endInput` is called, we must check if the corresponding snapshot exists.
// However, if the snapshot does not exist, then append files must be new files. So
// there is no need to check for duplicated append files.
- committer.filterAndCommit(committables, false);
+ committer.filterAndCommit(committables, false, true);
Review Comment:
We can't set this to true always.
Add a parameter in `PartitionListener` to tag whether it is recover from failover.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org