You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/02/10 22:07:48 UTC

[GitHub] [kafka] hachikuji opened a new pull request #11747: MINOR: Clearer field names for ProducerIdsRecord and related classes

hachikuji opened a new pull request #11747:
URL: https://github.com/apache/kafka/pull/11747


   I found the current naming of the fields a little confusing in regard to whether the block range was inclusive or exclusive. This patch tries to improve naming to make this clearer.
   
   ### 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



[GitHub] [kafka] hachikuji merged pull request #11747: MINOR: Clearer field names for ProducerIdsRecord and related classes

Posted by GitBox <gi...@apache.org>.
hachikuji merged pull request #11747:
URL: https://github.com/apache/kafka/pull/11747


   


-- 
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



[GitHub] [kafka] mumrah commented on a change in pull request #11747: MINOR: Clearer field names for ProducerIdsRecord and related classes

Posted by GitBox <gi...@apache.org>.
mumrah commented on a change in pull request #11747:
URL: https://github.com/apache/kafka/pull/11747#discussion_r804748320



##########
File path: metadata/src/main/java/org/apache/kafka/controller/ProducerIdControlManager.java
##########
@@ -33,49 +33,50 @@
 public class ProducerIdControlManager {
 
     private final ClusterControlManager clusterControlManager;
-    private final TimelineLong lastProducerId;
+    private final TimelineLong nextProducerId;

Review comment:
       Probably worth adding a comment that this (TimelineLong) initializes to zero




-- 
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



[GitHub] [kafka] dengziming commented on a change in pull request #11747: MINOR: Clearer field names for ProducerIdsRecord and related classes

Posted by GitBox <gi...@apache.org>.
dengziming commented on a change in pull request #11747:
URL: https://github.com/apache/kafka/pull/11747#discussion_r804572420



##########
File path: metadata/src/main/java/org/apache/kafka/image/ProducerIdsImage.java
##########
@@ -50,7 +50,7 @@ public void write(Consumer<List<ApiMessageAndVersion>> out) {
                 new ProducerIdsRecord().
                     setBrokerId(-1).
                     setBrokerEpoch(-1).
-                    setProducerIdsEnd(highestSeenProducerId), (short) 0)));
+                    setNextProducerId(highestSeenProducerId), (short) 0)));

Review comment:
       ditto

##########
File path: metadata/src/main/java/org/apache/kafka/image/ProducerIdsDelta.java
##########
@@ -27,11 +27,11 @@ public ProducerIdsDelta(ProducerIdsImage image) {
         this.highestSeenProducerId = image.highestSeenProducerId();
     }
 
-    public void setHighestSeenProducerId(long highestSeenProducerId) {
+    public void setNextProducerId(long highestSeenProducerId) {
         this.highestSeenProducerId = highestSeenProducerId;

Review comment:
       maybe we should also change this field name to nextProducerId?




-- 
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



[GitHub] [kafka] mumrah commented on a change in pull request #11747: MINOR: Clearer field names for ProducerIdsRecord and related classes

Posted by GitBox <gi...@apache.org>.
mumrah commented on a change in pull request #11747:
URL: https://github.com/apache/kafka/pull/11747#discussion_r804748320



##########
File path: metadata/src/main/java/org/apache/kafka/controller/ProducerIdControlManager.java
##########
@@ -33,49 +33,50 @@
 public class ProducerIdControlManager {
 
     private final ClusterControlManager clusterControlManager;
-    private final TimelineLong lastProducerId;
+    private final TimelineLong nextProducerId;

Review comment:
       Probably worth adding a comment that this initializes to zero




-- 
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