Skip to content

NIFI-11290: Ensure that components are notified that primary node has…#7052

Closed
markap14 wants to merge 2 commits into
apache:mainfrom
markap14:NIFI-11290
Closed

NIFI-11290: Ensure that components are notified that primary node has…#7052
markap14 wants to merge 2 commits into
apache:mainfrom
markap14:NIFI-11290

Conversation

@markap14
Copy link
Copy Markdown
Contributor

… changed in a background thread instead of the Leader Election thread and activate/deactivate the thread in the case of Processors so that they can be viewed in the UI and terminated

Summary

NIFI-00000

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 11
    • JDK 17

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@exceptionfactory exceptionfactory self-requested a review March 16, 2023 13:10
Copy link
Copy Markdown
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

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

Thanks for the improvements @markap14. The general approach looks good, moving the primary node state change handling to a separate thread should definitely make the framework more robust when encountering components that do not behave during those state changes.

The new system test is helpful, but it looks like it is subject to a timing problem, resulting in failures on both Ubuntu 11 and 17. Should the test include a wait for the node to become disconnected before attempting to reconnect it?

… changed in a background thread instead of the Leader Election thread and activate/deactivate the thread in the case of Processors so that they can be viewed in the UI and terminated
… they did not wait for node disconnection to complete and did not properly switch the client to look at the connected node before checking cluster status
Copy link
Copy Markdown
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

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

Thanks for updating the system tests @markap14. Runtime testing with basic triggering of primary node state changes also looks good. +1 merging

exceptionfactory pushed a commit that referenced this pull request Mar 23, 2023
- Ensure that components are notified that primary node has changed in a background thread instead of the Leader Election thread and activate/deactivate the thread in the case of Processors so that they can be viewed in the UI and terminated

- Fixed system tests that would fail intermittently because they did not wait for node disconnection to complete and did not properly switch the client to look at the connected node before checking cluster status

This closes #7052

Signed-off-by: David Handermann <exceptionfactory@apache.org>
r-vandenbos pushed a commit to r-vandenbos/nifi that referenced this pull request Apr 11, 2023
- Ensure that components are notified that primary node has changed in a background thread instead of the Leader Election thread and activate/deactivate the thread in the case of Processors so that they can be viewed in the UI and terminated

- Fixed system tests that would fail intermittently because they did not wait for node disconnection to complete and did not properly switch the client to look at the connected node before checking cluster status

This closes apache#7052

Signed-off-by: David Handermann <exceptionfactory@apache.org>
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