BewareMyPower opened a new pull request #10924:
URL: https://github.com/apache/pulsar/pull/10924


   ### Motivation
   
   When broker entry metadata is enabled, using pulsar-admin to peek messages 
will fail with
   
   ```
   [pulsar-web-29-16] ERROR 
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase - [null] Failed to 
peek message at position 1 from persistent://prop/ns-abc/topic-b604aad8ea8010af 
my-sub
   java.lang.IllegalArgumentException: Invalid unknonwn tag type: 6
        at 
org.apache.pulsar.common.api.proto.LightProtoCodec.skipUnknownField(LightProtoCodec.java:270)
 ~[classes/:?]
        at 
org.apache.pulsar.common.api.proto.MessageMetadata.parseFrom(MessageMetadata.java:1370)
 ~[classes/:?]
        at 
org.apache.pulsar.common.protocol.Commands.parseMessageMetadata(Commands.java:426)
 ~[classes/:?]
   ```
   
   ### Modifications
   
   Skip the broker entry metadata if exists in `generateResponseWithEntry` and 
add the test to verify it.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   
     - Run `BrokerEntryMetadataE2ETest#testPeekMessage`


-- 
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:
[email protected]


Reply via email to