congbobo184 commented on a change in pull request #10995: URL: https://github.com/apache/pulsar/pull/10995#discussion_r655892250
########## File path: pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleSchemaTest.java ########## @@ -555,7 +555,16 @@ public void testAutoKeyValueConsume(boolean batching) throws Exception { Schema.AVRO(V1Data.class), KeyValueEncodingType.SEPARATED); - try (Producer<KeyValue<V1Data, V1Data>> p = pulsarClient.newProducer(pojoSchema) + try (Consumer<KeyValue<GenericRecord, V1Data>> c3before = pulsarClient.newConsumer( + Schema.KeyValue( + Schema.AUTO_CONSUME(), + Schema.AVRO(V1Data.class), + KeyValueEncodingType.SEPARATED)) Review comment: could you add `KeyValueEncodingType.INLINE ` test? ########## File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java ########## @@ -1012,7 +1013,8 @@ public MemoryLimitController getMemoryLimitController() { @SuppressWarnings("rawtypes") Schema finalSchema = schema; return schemaInfoProvider.getLatestSchema().thenCompose(schemaInfo -> { if (null == schemaInfo) { - if (!(finalSchema instanceof AutoConsumeSchema)) { + if (!(finalSchema instanceof AutoConsumeSchema) + && !(finalSchema instanceof KeyValueSchema)) { Review comment: one of keySchema and valueSchema is `AutoConsumeSchema` need this right? ########## File path: pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleSchemaTest.java ########## @@ -555,7 +555,16 @@ public void testAutoKeyValueConsume(boolean batching) throws Exception { Schema.AVRO(V1Data.class), KeyValueEncodingType.SEPARATED); - try (Producer<KeyValue<V1Data, V1Data>> p = pulsarClient.newProducer(pojoSchema) + try (Consumer<KeyValue<GenericRecord, V1Data>> c3before = pulsarClient.newConsumer( + Schema.KeyValue( + Schema.AUTO_CONSUME(), + Schema.AVRO(V1Data.class), + KeyValueEncodingType.SEPARATED)) Review comment: could you please add `KeyValueEncodingType.INLINE ` test? -- 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: us...@infra.apache.org