Skip to content

Conversation

banmoy
Copy link
Collaborator

@banmoy banmoy commented Mar 3, 2023

What type of PR is this:

  • bugfix
  • feature
  • enhancement
  • refactor
  • others

Which issues of this PR fixes :

Problem Summary(Required) :

The case is:

  1. Flink job complete checkpoint 1, and commit the transaction with label label1
  2. StarRocks FE leader restarts for some reasons, such as upgrade, and flink job fails because FE is down
  3. After FE is restarted, flink job restores from checkpoint 1, and re-commit the transaction with label label1, but FE returns a failed status with error message like UserException: transaction with op commit label 154968ac-c52b-4ae9-8fdf-1df64f285b96 has no backend (see TransactionLoadAction#executeTransaction for details)
  4. Commit failure will trigger the flink job failure again, and in a dead loop, but actually the transaction has been committed successfully before, so the job should run normally

The solution is that check label state if commit failed no matter what reason. If the label state is COMMITTED or VISIBLE, the commit should be successful. This can reduce the dependency for the behavior of StarRocks

Additionally, this PR improves some error messages.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • I have added user document for my new feature or new function

@banmoy banmoy changed the title [Bugfix] Always check label state if fail to commit [Bugfix] Check label state if fail to commit because FE restarts Mar 3, 2023
Signed-off-by: PengFei Li <[email protected]>
@banmoy banmoy merged commit 71ea5bd into StarRocks:main Mar 3, 2023
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Mar 6, 2023
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Mar 6, 2023
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Mar 6, 2023
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Mar 6, 2023
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Mar 6, 2023
banmoy added a commit that referenced this pull request Mar 6, 2023
banmoy added a commit that referenced this pull request Mar 6, 2023
banmoy added a commit that referenced this pull request Mar 6, 2023
banmoy added a commit that referenced this pull request Mar 6, 2023
banmoy added a commit that referenced this pull request Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants