Skip to content

KAFKA-14900: Fix NPE in SharedServer causing flaky failure in AuthorizerTest#13549

Closed
gharris1727 wants to merge 1 commit into
apache:trunkfrom
gharris1727:kafka-14900-flaky-authorizer-npe
Closed

KAFKA-14900: Fix NPE in SharedServer causing flaky failure in AuthorizerTest#13549
gharris1727 wants to merge 1 commit into
apache:trunkfrom
gharris1727:kafka-14900-flaky-authorizer-npe

Conversation

@gharris1727

Copy link
Copy Markdown
Contributor

It appears that raftManager can become null via ControllerServer.shutdown() -> ensureNotRaftLeader() and various call sites of stop(). Rather than emit an NPE, evaluate raftManager.client while it is known to be non-null, and pass the evaluated client into the setHighWaterMarkAccessor.

I unfortunately don't have much context here, and I'm not sure if once raftManager becomes null, if it is still reasonable to evaluate highWatermark(), or whether the HighWaterMarkAccessor should return empty.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

…zerTest

Signed-off-by: Greg Harris <greg.harris@aiven.io>
@gharris1727

Copy link
Copy Markdown
Contributor Author

@cmccabe Could you review this fix?

@gharris1727

Copy link
Copy Markdown
Contributor Author

This duplicates #13543 so I'll close this in favor of that more comprehensive change.

@cmccabe

cmccabe commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

Thanks @gharris1727 .

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