You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "m1a2st (via GitHub)" <gi...@apache.org> on 2024/10/28 15:45:03 UTC

[PR] KAFKA-17882: improve the document about "default value" of tagged structure field [kafka]

m1a2st opened a new pull request, #17618:
URL: https://github.com/apache/kafka/pull/17618

   Jira: https://issues.apache.org/jira/browse/KAFKA-17882
   
   In message/README.md is doesn't mention about how to handle the tagged field, thus we need to write the document to carify this behavior
   
   ### 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-17882: improve the document about "default value" of tagged structure field [kafka]

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


##########
clients/src/main/resources/common/message/README.md:
##########
@@ -139,6 +139,20 @@ breaking compatibility.
 
 Note that tagged fields can only be added to "flexible" message versions.
 
+**Default Value Handling for Tagged Fields**
+
+In Kafka's serialization mechanism, when a tagged field is present, it may be omitted 

Review Comment:
   Thanks, I missed this 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-17882: improve the document about "default value" of tagged structure field [kafka]

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


##########
clients/src/main/resources/common/message/README.md:
##########
@@ -139,6 +139,20 @@ breaking compatibility.
 
 Note that tagged fields can only be added to "flexible" message versions.
 
+**Default Value Handling for Tagged Fields**
+
+In Kafka's serialization mechanism, when a tagged field is present, it may be omitted 

Review Comment:
   we have described that in https://github.com/apache/kafka/blob/68c6c6da8622af02a277bbffd010000e5060eed8/clients/src/main/resources/common/message/README.md?plain=1#L168



-- 
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-17882: improve the document about "default value" of tagged structure field [kafka]

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


-- 
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-17882: improve the document about "default value" of tagged structure field [kafka]

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


##########
clients/src/main/resources/common/message/README.md:
##########
@@ -139,6 +139,20 @@ breaking compatibility.
 
 Note that tagged fields can only be added to "flexible" message versions.
 
+**Default Value Handling for Tagged Fields**
+
+In Kafka's serialization mechanism, when a tagged field is present, it may be omitted 

Review Comment:
   I am not sure that should we remove the `implicit default`, because there are any section mention about 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-17882: improve the document about "default value" of tagged structure field [kafka]

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


##########
clients/src/main/resources/common/message/README.md:
##########
@@ -139,6 +139,20 @@ breaking compatibility.
 
 Note that tagged fields can only be added to "flexible" message versions.
 
+**Default Value Handling for Tagged Fields**
+
+In Kafka's serialization mechanism, when a tagged field is present, it may be omitted 

Review Comment:
   ```
   In Kafka's serialization mechanism, a tagged field may be omitted from the serialized message if all its associated fields are equal to their default values, whether those defaults are explicit or implicit. This behavior optimizes message size by avoiding the transmission of redundant data.
   ```
   and the following description of `Explicit Defaults` and ` Implicit Defaults` can be removed. WDYT?



-- 
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-17882: improve the document about "default value" of tagged structure field [kafka]

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


##########
clients/src/main/resources/common/message/README.md:
##########
@@ -139,6 +139,12 @@ breaking compatibility.
 
 Note that tagged fields can only be added to "flexible" message versions.
 
+**Default Value Handling for Tagged Fields**

Review Comment:
   Could you please use `####` instead?



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