You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Rancho-7 (via GitHub)" <gi...@apache.org> on 2024/12/16 12:40:10 UTC

[PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Rancho-7 opened a new pull request, #18211:
URL: https://github.com/apache/kafka/pull/18211

   jira: https://issues.apache.org/jira/browse/KAFKA-18264
   
   As title.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "Rancho-7 (via GitHub)" <gi...@apache.org>.
Rancho-7 commented on code in PR #18211:
URL: https://github.com/apache/kafka/pull/18211#discussion_r1888478333


##########
docs/upgrade.html:
##########
@@ -44,6 +44,8 @@ <h5><a id="upgrade_400_notable" href="#upgrade_400_notable">Notable changes in 4
                         <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.

Review Comment:
   > trunk is in 4.1.0 now, so please create the new section :)
   
   Thanks! Updated it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #18211:
URL: https://github.com/apache/kafka/pull/18211


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "Rancho-7 (via GitHub)" <gi...@apache.org>.
Rancho-7 commented on code in PR #18211:
URL: https://github.com/apache/kafka/pull/18211#discussion_r1889380913


##########
docs/upgrade.html:
##########
@@ -19,6 +19,21 @@
 
 <script id="upgrade-template" type="text/x-handlebars-template">
 
+<h4><a id="upgrade_4_1_0" href="#upgrade_4_1_0">Upgrading to 4.1.0 from any version 0.8.x through 4.0.0</a></h4>
+    <h5><a id="upgrade_410_notable" href="#upgrade_410_notable">Notable changes in 4.1.0</a></h5>
+    <ul>
+        <li>A number of deprecated classes, methods, configurations and tools have been removed.
+            <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.

Review Comment:
   > 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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #18211:
URL: https://github.com/apache/kafka/pull/18211#issuecomment-2547492354

   > I'm not quite sure. Should we add it to the 4.0 version of upgrade.html?
   
   yes, please :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "Rancho-7 (via GitHub)" <gi...@apache.org>.
Rancho-7 commented on PR #18211:
URL: https://github.com/apache/kafka/pull/18211#issuecomment-2547597047

   > yes, please :)
   
   Thanks! Updated it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #18211:
URL: https://github.com/apache/kafka/pull/18211#discussion_r1888428475


##########
docs/upgrade.html:
##########
@@ -44,6 +44,8 @@ <h5><a id="upgrade_400_notable" href="#upgrade_400_notable">Notable changes in 4
                         <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.

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #18211:
URL: https://github.com/apache/kafka/pull/18211#discussion_r1889426055


##########
docs/upgrade.html:
##########
@@ -44,6 +44,8 @@ <h5><a id="upgrade_400_notable" href="#upgrade_400_notable">Notable changes in 4
                         <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.

Review Comment:
   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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "Yunyung (via GitHub)" <gi...@apache.org>.
Yunyung commented on PR #18211:
URL: https://github.com/apache/kafka/pull/18211#issuecomment-2545563942

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "mimaison (via GitHub)" <gi...@apache.org>.
mimaison commented on code in PR #18211:
URL: https://github.com/apache/kafka/pull/18211#discussion_r1888900839


##########
docs/upgrade.html:
##########
@@ -19,6 +19,21 @@
 
 <script id="upgrade-template" type="text/x-handlebars-template">
 
+<h4><a id="upgrade_4_1_0" href="#upgrade_4_1_0">Upgrading to 4.1.0 from any version 0.8.x through 4.0.0</a></h4>
+    <h5><a id="upgrade_410_notable" href="#upgrade_410_notable">Notable changes in 4.1.0</a></h5>
+    <ul>
+        <li>A number of deprecated classes, methods, configurations and tools have been removed.
+            <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.

Review Comment:
   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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "Rancho-7 (via GitHub)" <gi...@apache.org>.
Rancho-7 commented on code in PR #18211:
URL: https://github.com/apache/kafka/pull/18211#discussion_r1890121585


##########
docs/upgrade.html:
##########
@@ -44,6 +44,8 @@ <h5><a id="upgrade_400_notable" href="#upgrade_400_notable">Notable changes in 4
                         <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.

Review Comment:
   > 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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18264: Remove NotLeaderForPartitionException [kafka]

Posted by "Rancho-7 (via GitHub)" <gi...@apache.org>.
Rancho-7 commented on PR #18211:
URL: https://github.com/apache/kafka/pull/18211#issuecomment-2545736912

   > 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org