Skip to content

MINOR: replace NotLeaderForPartitionException with NotLeaderOrFollowerException#9885

Merged
mimaison merged 2 commits intoapache:trunkfrom
showuon:useNotLeaderOrFollowerException
Jan 14, 2021
Merged

MINOR: replace NotLeaderForPartitionException with NotLeaderOrFollowerException#9885
mimaison merged 2 commits intoapache:trunkfrom
showuon:useNotLeaderOrFollowerException

Conversation

@showuon
Copy link
Copy Markdown
Member

@showuon showuon commented Jan 14, 2021

The NotLeaderForPartitionException is deprecated in 2.6 in this PR #8979. We should replace NotLeaderForPartitionException with NotLeaderOrFollowerException.

Committer Checklist (excluded from commit message)

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

@showuon
Copy link
Copy Markdown
Member Author

showuon commented Jan 14, 2021

@mimaison , I think you mis-replaced the exception with the deprecated one in #8295. Could you confirm it and review this PR? Thank you.

_ : KafkaStorageException |
_ : UnsupportedForMessageFormatException) =>
// print the stack trace for debugging
e.printStackTrace()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't make much sense, we should not be printing the stacktrace like this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I agree. But I'd like to confirm with @mimaison since he added it in #8295. Thanks.

@showuon
Copy link
Copy Markdown
Member Author

showuon commented Jan 14, 2021

@mimaison , I also removed the e.printStackTrace(). Please let me know if you mis-put this debugging line here. Thanks.

@mimaison
Copy link
Copy Markdown
Member

@showuon That's definitively a mistake, thanks for the PR

@mimaison
Copy link
Copy Markdown
Member

Tests passed locally, merging to trunk

@mimaison mimaison merged commit 2746af4 into apache:trunk Jan 14, 2021
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.

3 participants