Skip to content

KAFKA-10677; Complete fetches in purgatory immediately after resigning#9639

Merged
hachikuji merged 4 commits into
apache:trunkfrom
dengziming:KAFKA-KAFKA-10677
Dec 10, 2020
Merged

KAFKA-10677; Complete fetches in purgatory immediately after resigning#9639
hachikuji merged 4 commits into
apache:trunkfrom
dengziming:KAFKA-KAFKA-10677

Conversation

@dengziming

Copy link
Copy Markdown
Member

More detailed description of your change

If the condition of fetch is satisfied, BROKER_NOT_AVAILABLE or NOT_LEADER_OR_FOLLOWER is returned when the leader is shutting down. so we just return BROKER_NOT_AVAILABLE with a message.

Summary of testing strategy
A simple unit test to verify fetches in purgatory is completed after resigning.

Committer Checklist (excluded from commit message)

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

@dengziming

Copy link
Copy Markdown
Member Author

ping @hachikuji to have a look.

@hachikuji hachikuji left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@dengziming Thanks for the patch. Just had a couple minor comments on the test case.

Comment thread raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientTest.java Outdated
Comment thread raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientTest.java Outdated

@hachikuji hachikuji left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Note I pushed a trivial alignment fix in RaftClientTestContext.

@hachikuji hachikuji merged commit 125d5ea into apache:trunk Dec 10, 2020
@dengziming dengziming deleted the KAFKA-KAFKA-10677 branch October 8, 2022 12:05
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