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

NIFI-11794 - Fix NPE + configure max attempts for Redis State Provider #7473

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

pvillard31
Copy link
Contributor

Summary

NIFI-11794 - Fix NPE + configure max attempts for Redis State Provider

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

@ottobackwards
Copy link
Contributor

This looks good, is there a way to test this specifically that we should cover?

@pvillard31
Copy link
Contributor Author

I tried adding a unit test showing the issue but didn't find a way to reproduce it. You have to simulate two nodes at the same time trying to access the same key.

@ottobackwards
Copy link
Contributor

would a failure to connect over max attempts ( to get the null and new check) work? without the nodes at all? or would that fail a different way?

@ottobackwards
Copy link
Contributor

then again, a null check is a pretty obvious fix there, maybe we don't need to....

@pvillard31
Copy link
Contributor Author

That would not cause the null error. EXEC returns null in case the transaction has been aborted. So you'd need to simulate one node/thread to have a transaction starting with a WATCH on the key, then another node/thread completing a transaction on the same key, to have the first one receiving a null. The logs I shared in the JIRA comment are coming from a cluster that I patched with this fix.

@ottobackwards ottobackwards merged commit 8a61d5b into apache:main Jul 14, 2023
6 checks passed
asfgit pushed a commit that referenced this pull request Jul 14, 2023
#7473)

Signed-off-by: Otto Fowler<ottobackwards@gmail.com>

This closes #7473.
@pvillard31
Copy link
Contributor Author

Thanks @ottobackwards

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