Skip to content

RATIS-2656. Fix BaseStateMachine lifecycle transitions - #1663

Open
dajiaohuang wants to merge 1 commit into
apache:masterfrom
dajiaohuang:ratis-2656-base-state-machine-lifecycle
Open

dajiaohuang wants to merge 1 commit into
apache:masterfrom
dajiaohuang:ratis-2656-base-state-machine-lifecycle

Conversation

@dajiaohuang

Copy link
Copy Markdown

What changes were proposed in this pull request?

Give the default BaseStateMachine.pause() and reinitialize() implementations the lifecycle transitions required by streamed snapshot installation: RUNNING -> PAUSING -> PAUSED and PAUSED -> STARTING -> RUNNING. Add a focused lifecycle regression test.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/RATIS-2656

How was this patch tested?

Ran the task-local Maven Wrapper test command -pl ratis-server -am -Dtest=TestBaseStateMachine -Dsurefire.failIfNoSpecifiedTests=false test with an isolated Maven repository. Result: reactor BUILD SUCCESS; 1 test, 0 failures, 0 errors, 0 skipped. No full suite or CI result is claimed.

@amaliujia amaliujia left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to me it is fine to have the default implementation as we do not throw unsupported exception by default.

Will wait to see if other people know any pitfall existing before merging.

This branch has not been deployed

No deployments
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