You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/02 09:09:06 UTC

[GitHub] [pulsar] gaoran10 opened a new pull request #7139: Support KeyValue Schema Use Null Key And Null Value

gaoran10 opened a new pull request #7139:
URL: https://github.com/apache/pulsar/pull/7139


   Fixes #4804 
   
   ### Motivation
   
   Currently, the KeyValue schema doesn't handle `null` key and `null` value well.
   
   ### Modifications
   
   Make the KeyValue schema support `null` key and `null` value
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   
   - Add unit test.
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (yes)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (JavaDocs)


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

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



[GitHub] [pulsar] codelipenghui commented on a change in pull request #7139: Support KeyValue Schema Use Null Key And Null Value

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #7139:
URL: https://github.com/apache/pulsar/pull/7139#discussion_r434924022



##########
File path: pulsar-common/src/main/proto/PulsarApi.proto
##########
@@ -143,6 +143,9 @@ message MessageMetadata {
 	optional int32 num_chunks_from_msg = 27;
 	optional int32 total_chunk_msg_size = 28;
 	optional int32 chunk_id = 29;
+
+    // Indicate if the message key is set
+    optional bool null_key = 30 [default = false];

Review comment:
       It's better to use null_partition_key here since we have partition_key and ordering key in the proto. Use null_partition_key will be more accurate.

##########
File path: pulsar-common/src/main/proto/PulsarApi.proto
##########
@@ -161,6 +164,8 @@ message SingleMessageMetadata {
     optional uint64 sequence_id = 8;
     // Indicate if the message payload value is set
     optional bool null_value = 9 [ default = false ];
+    // Indicate if the message key is set
+    optional bool null_key = 10 [ default = false];

Review comment:
       Same as the above comment.




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

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



[GitHub] [pulsar] codelipenghui merged pull request #7139: Support KeyValue Schema Use Null Key And Null Value

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #7139:
URL: https://github.com/apache/pulsar/pull/7139


   


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

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



[GitHub] [pulsar] codelipenghui commented on pull request #7139: Support KeyValue Schema Use Null Key And Null Value

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #7139:
URL: https://github.com/apache/pulsar/pull/7139#issuecomment-638512747


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] jiazhai commented on pull request #7139: Support KeyValue Schema Use Null Key And Null Value

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #7139:
URL: https://github.com/apache/pulsar/pull/7139#issuecomment-638830480


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] codelipenghui commented on pull request #7139: Support KeyValue Schema Use Null Key And Null Value

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #7139:
URL: https://github.com/apache/pulsar/pull/7139#issuecomment-638643367


   /pulsarbot run-failure-checks


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

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



[GitHub] [pulsar] fmiguelez commented on pull request #7139: Support KeyValue Schema Use Null Key And Null Value

Posted by GitBox <gi...@apache.org>.
fmiguelez commented on pull request #7139:
URL: https://github.com/apache/pulsar/pull/7139#issuecomment-651004589


   This does not work as described [here](https://github.com/apache/pulsar/issues/4803#issuecomment-651003387)


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

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