Skip to content

KAFKA-18264: Remove NotLeaderForPartitionException#18211

Merged
chia7712 merged 8 commits intoapache:trunkfrom
Rancho-7:KAFKA-18264
Dec 18, 2024
Merged

KAFKA-18264: Remove NotLeaderForPartitionException#18211
chia7712 merged 8 commits intoapache:trunkfrom
Rancho-7:KAFKA-18264

Conversation

@Rancho-7
Copy link
Copy Markdown
Collaborator

@Rancho-7 Rancho-7 commented Dec 16, 2024

jira: https://issues.apache.org/jira/browse/KAFKA-18264

As title.

uuu

Committer Checklist (excluded from commit message)

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

@github-actions github-actions bot added triage PRs from the community core Kafka Broker clients small Small PRs labels Dec 16, 2024
@Yunyung
Copy link
Copy Markdown
Collaborator

Yunyung commented Dec 16, 2024

Should we mention it's removed in upgrade.html?

@Rancho-7
Copy link
Copy Markdown
Collaborator Author

Should we mention it's removed in upgrade.html?

I'm not quite sure. Should we add it to the 4.0 version of upgrade.html? @chia7712

@chia7712
Copy link
Copy Markdown
Member

I'm not quite sure. Should we add it to the 4.0 version of upgrade.html?

yes, please :)

@Rancho-7
Copy link
Copy Markdown
Collaborator Author

yes, please :)

Thanks! Updated it.

Comment thread docs/upgrade.html Outdated
<li>The <code>kafka.common.requests.DescribeLogDirsResponse.ReplicaInfo</code> class was removed. Please use the <code>kafka.clients.admin.DescribeLogDirsResult.descriptions()</code> class
and <code>kafka.clients.admin.DescribeLogDirsResult.allDescriptions()</code>instead.
</li>
<li>The <code>kafka.common.errors.NotLeaderForPartitionException</code> class was removed. Please use the <code>kafka.common.errors.NotLeaderOrFollowerException</code> class instead.
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.

trunk is in 4.1.0 now, so please create the new section :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

trunk is in 4.1.0 now, so please create the new section :)

Thanks! Updated it.

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.

It seems we have the room to push more cleanup to 4.0.0, so could you please move it back to 4.0.0 section? I will backport this to 4.0 branch

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It seems we have the room to push more cleanup to 4.0.0, so could you please move it back to 4.0.0 section? I will backport this to 4.0 branch

Sure.I will move it back.

Comment thread docs/upgrade.html Outdated
<ul>
<li><b>Common</b>
<ul>
<li>The <code>kafka.common.errors.NotLeaderForPartitionException</code> class was removed. Please use the <code>kafka.common.errors.NotLeaderOrFollowerException</code> class instead.
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.

Let's use the full class names org.apache.kafka.common.errors.

Also users should not have to use NotLeaderOrFollowerException. Instead we can say something like org.apache.kafka.common.errors.NotLeaderOrFollowerException is returned if a request could not be processed because the broker is not the leader or follower for a topic partition.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Let's use the full class names org.apache.kafka.common.errors.

Also users should not have to use NotLeaderOrFollowerException. Instead we can say something like org.apache.kafka.common.errors.NotLeaderOrFollowerException is returned if a request could not be processed because the broker is not the leader or follower for a topic partition.

Sounds good.Thanks for review! Addressed it.

@github-actions github-actions bot removed the triage PRs from the community label Dec 17, 2024
Copy link
Copy Markdown
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

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

LGTM

@chia7712 chia7712 merged commit 21b7bb2 into apache:trunk Dec 18, 2024
chia7712 pushed a commit that referenced this pull request Dec 18, 2024
Reviewers: Yung <yungyung7654321@gmail.com>, Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
ijuma added a commit to ijuma/kafka that referenced this pull request Dec 19, 2024
…e-old-protocol-versions

* apache-github/trunk: (25 commits)
  KAFKA-18270: FindCoordinator v0 incorrectly tagged as deprecated (apache#18262)
  KAFKA-18284: Add group coordinator records for Streams rebalance protocol (apache#18228)
  MINOR: Fix flaky state updater test (apache#18253)
  MINOR: improve StreamsResetter logging (apache#18237)
  KAFKA-18227: Ensure v2 partitions are not added to last transaction during upgrade (apache#18176)
  Add IT for share consumer with duration base offet auto reset (apache#18251)
  KAFKA-18283: Add StreamsGroupDescribe RPC definitions (apache#18230)
  KAFKA-18241: add docs check to CI (apache#18183)
  KAFKA-18223 Improve flaky test report (apache#18212)
  MINOR Remove triage label in nightly job (apache#18147)
  KAFKA-18294 Remove deprecated SourceTask#commitRecord (apache#18260)
  KAFKA-18264 Remove NotLeaderForPartitionException (apache#18211)
  KAFKA-13722: Refactor SerdeGetter (apache#18242)
  KAFKA-18094 Remove deprecated TopicListing(String, Boolean) (apache#18248)
  KAFKA-18282: Add StreamsGroupHeartbeat RPC definitions (apache#18227)
  KAFKA-18026: KIP-1112 migrate KTableSuppressProcessorSupplier (apache#18150)
  KAFKA-18026: transition KTable#filter impl to use processor wrapper (apache#18205)
  KAFKA-18293 Remove `org.apache.kafka.common.security.oauthbearer.secured.OAuthBearerLoginCallbackHandler` and `org.apache.kafka.common.security.oauthbearer.secured.OAuthBearerValidatorCallbackHandler` (apache#18244)
  MINOR: add assertion about groupEpoch and targetAssignmentEpoch to testConsumerGroups (apache#18203)
  KAFKA-17960; PlaintextAdminIntegrationTest.testConsumerGroups fails with CONSUMER group protocol (apache#18234)
  ...
tedyu pushed a commit to tedyu/kafka that referenced this pull request Jan 6, 2025
Reviewers: Yung <yungyung7654321@gmail.com>, Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants