Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Make some operation type ignorable when replaying journal fails (backport #39091) #42543

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 13, 2024

This is an automatic backport of pull request #39091 done by Mergify.
Cherry-pick of 9694e10 has failed:

On branch mergify/bp/branch-2.5/pr-39091
Your branch is up to date with 'origin/branch-2.5'.

You are currently cherry-picking commit 9694e107df.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   fe/fe-core/src/main/java/com/starrocks/journal/JournalException.java
	modified:   fe/fe-core/src/main/java/com/starrocks/journal/JournalInconsistentException.java
	modified:   fe/fe-core/src/main/java/com/starrocks/journal/bdbje/BDBEnvironment.java
	modified:   fe/fe-core/src/main/java/com/starrocks/journal/bdbje/BDBJournalCursor.java
	new file:   fe/fe-core/src/main/java/com/starrocks/persist/IgnorableOnReplayFailed.java
	modified:   fe/fe-core/src/main/java/com/starrocks/server/NodeMgr.java
	deleted:    fe/fe-core/src/test/java/com/starrocks/catalog/GlobalStateMgrTest.java
	modified:   fe/fe-core/src/test/java/com/starrocks/journal/bdbje/BDBJournalCursorTest.java
	new file:   fe/fe-core/src/test/java/com/starrocks/persist/OperationTypeTest.java

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   docs/en/administration/FE_configuration.md
	deleted by us:   docs/zh/administration/FE_configuration.md
	both modified:   fe/fe-core/src/main/java/com/starrocks/common/Config.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/journal/JournalEntity.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/persist/EditLog.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/persist/OperationType.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/server/GlobalStateMgr.java
	both modified:   fe/fe-core/src/test/java/com/starrocks/persist/EditLogTest.java
	both modified:   fe/fe-core/src/test/java/com/starrocks/server/GlobalStateMgrTest.java

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

Why I'm doing: Journal replay failure is the main reason for FE startup failure, but most Journal replay failures only affect the use of a small function. Therefore, it is necessary to sort out the severity of each replay failure and ignore the OperationType with a relatively small impact.

What I'm doing:
The replay failure of OperationType with @IgnorableOnReplayFailed annotation will be ignored when Config. metadata_journal_ignore_replay_failure is set to true.

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

…al fails (#39091)

Why I'm doing:
Journal replay failure is the main reason for FE startup failure, but most Journal replay failures only affect the use of a small function. Therefore, it is necessary to sort out the severity of each replay failure and ignore the OperationType with a relatively small impact.

What I'm doing:
The replay failure of OperationType with @IgnorableOnReplayFailed annotation will be ignored when `Config. metadata_journal_ignore_replay_failure` is set to true.

Signed-off-by: gengjun-git <[email protected]>
(cherry picked from commit 9694e10)

# Conflicts:
#	docs/en/administration/FE_configuration.md
#	docs/zh/administration/FE_configuration.md
#	fe/fe-core/src/main/java/com/starrocks/common/Config.java
#	fe/fe-core/src/main/java/com/starrocks/journal/JournalEntity.java
#	fe/fe-core/src/main/java/com/starrocks/persist/EditLog.java
#	fe/fe-core/src/main/java/com/starrocks/persist/OperationType.java
#	fe/fe-core/src/main/java/com/starrocks/server/GlobalStateMgr.java
#	fe/fe-core/src/test/java/com/starrocks/persist/EditLogTest.java
#	fe/fe-core/src/test/java/com/starrocks/server/GlobalStateMgrTest.java
@mergify mergify bot added the conflicts label Mar 13, 2024
Copy link
Contributor Author

mergify bot commented Mar 13, 2024

Cherry-pick of 9694e10 has failed:

On branch mergify/bp/branch-2.5/pr-39091
Your branch is up to date with 'origin/branch-2.5'.

You are currently cherry-picking commit 9694e107df.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   fe/fe-core/src/main/java/com/starrocks/journal/JournalException.java
	modified:   fe/fe-core/src/main/java/com/starrocks/journal/JournalInconsistentException.java
	modified:   fe/fe-core/src/main/java/com/starrocks/journal/bdbje/BDBEnvironment.java
	modified:   fe/fe-core/src/main/java/com/starrocks/journal/bdbje/BDBJournalCursor.java
	new file:   fe/fe-core/src/main/java/com/starrocks/persist/IgnorableOnReplayFailed.java
	modified:   fe/fe-core/src/main/java/com/starrocks/server/NodeMgr.java
	deleted:    fe/fe-core/src/test/java/com/starrocks/catalog/GlobalStateMgrTest.java
	modified:   fe/fe-core/src/test/java/com/starrocks/journal/bdbje/BDBJournalCursorTest.java
	new file:   fe/fe-core/src/test/java/com/starrocks/persist/OperationTypeTest.java

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   docs/en/administration/FE_configuration.md
	deleted by us:   docs/zh/administration/FE_configuration.md
	both modified:   fe/fe-core/src/main/java/com/starrocks/common/Config.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/journal/JournalEntity.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/persist/EditLog.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/persist/OperationType.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/server/GlobalStateMgr.java
	both modified:   fe/fe-core/src/test/java/com/starrocks/persist/EditLogTest.java
	both modified:   fe/fe-core/src/test/java/com/starrocks/server/GlobalStateMgrTest.java

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions bot added documentation Improvements or additions to documentation automerge labels Mar 13, 2024
@wanpengfei-git wanpengfei-git enabled auto-merge (squash) March 13, 2024 06:23
@mergify mergify bot closed this Mar 13, 2024
auto-merge was automatically disabled March 13, 2024 06:23

Pull request was closed

Copy link
Contributor Author

mergify bot commented Mar 13, 2024

@mergify[bot]: Backport conflict, please reslove the conflict and resubmit the pr

@mergify mergify bot deleted the mergify/bp/branch-2.5/pr-39091 branch March 13, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge conflicts documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant