Skip to content

NIFI-14467 Gracefully stop ConsumeBoxEnterpriseEvents#9873

Merged
exceptionfactory merged 1 commit intoapache:mainfrom
awelless:NIFI-14467_Gracefully_stop_ConsumeBoxEnterpriseEvents
Apr 17, 2025
Merged

NIFI-14467 Gracefully stop ConsumeBoxEnterpriseEvents#9873
exceptionfactory merged 1 commit intoapache:mainfrom
awelless:NIFI-14467_Gracefully_stop_ConsumeBoxEnterpriseEvents

Conversation

@awelless
Copy link
Contributor

@awelless awelless commented Apr 11, 2025

Summary

NIFI-14467

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 21

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
Copy link
Contributor

Thanks @awelless, can you rebase this pull request? That will resolve unrelated unit test failures.

Comment on lines +182 to +183
while (true) {
if (!isScheduled()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of having the nested conditional, can the while condition be changed to while (isScheduled())?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for the condition is to provide a reason why we stopped further processing. Similar to when eventLog.getSize() == 0

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the response. Given that these are debug logs, not written in the default configuration, I recommend simplifying the implementation and removing this log. The other debug logs that include the stream position are useful, and should provide sufficient details for debugging.

@awelless awelless force-pushed the NIFI-14467_Gracefully_stop_ConsumeBoxEnterpriseEvents branch from 06b1431 to 07850d4 Compare April 11, 2025 16:45
@awelless awelless force-pushed the NIFI-14467_Gracefully_stop_ConsumeBoxEnterpriseEvents branch from 07850d4 to af71361 Compare April 11, 2025 18:19
Copy link
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 making the adjustments @awelless, the latest version looks good! +1 merging

@exceptionfactory exceptionfactory merged commit 2559fc1 into apache:main Apr 17, 2025
6 checks passed
@awelless awelless deleted the NIFI-14467_Gracefully_stop_ConsumeBoxEnterpriseEvents branch April 22, 2025 11:12
TomaszK-stack pushed a commit to TomaszK-stack/nifi that referenced this pull request May 5, 2025
…#9873)

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