alpreu opened a new issue, #18658: URL: https://github.com/apache/pulsar/issues/18658
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Version The affected version is Pulsar 2.9.3 ### Minimal reproduce step 1) Produce a message without explicitly setting a schema: ``` Producer<byte[]> producer = client.newProducer().topic("triage-topic").create(); JsonObject json = new JsonObject(); json.addProperty("id", "aaa"); byte[] payload = json.toString().getBytes(StandardCharsets.UTF_8); producer.sendAsync(payload); ``` 2) Deploy a `Sink<GenericRecord>` connector (e.g. https://github.com/streamnative/pulsar-io-cloud-storage) consuming the topic above 3) Check the record schema ``` @Override public void write(Record<GenericRecord> record) throws Exception { log.info(record); log.info(record.getSchema().toString()); } ``` ### What did you expect to see? Pulsar 2.9.2 ``` SinkRecord(sourceRecord=PulsarRecord(topicName=Optional[persistent://public/default/triage-topic], partition=0, message=Optional[org.apache.pulsar.client.impl.MessageImpl@861a908], schema=org.apache.pulsar.client.impl.schema.BytesSchema@2a094ea1, failFunction=org.apache.pulsar.functions.source.PulsarSource$$Lambda$329/0x00000008006451e0@4fb29f58, ackFunction=org.apache.pulsar.functions.source.PulsarSource$$Lambda$328/0x0000000800644fb8@127a2fbb), value=[B@1756fd15) org.apache.pulsar.client.impl.schema.BytesSchema@2a094ea1 ``` ### What did you see instead? Pulsar 2.9.3 ``` SinkRecord(sourceRecord=PulsarRecord(topicName=Optional[persistent://public/default/triage-topic], partition=0, message=Optional[org.apache.pulsar.client.impl.MessageImpl@2b63d4b1], schema=AUTO_CONSUME({schemaVersion=,schemaType=BYTES}), failFunction=org.apache.pulsar.functions.source.PulsarSource$$Lambda$330/0x0000000800643d90@7addff50, ackFunction=org.apache.pulsar.functions.source.PulsarSource$$Lambda$329/0x0000000800643b68@513acbbe), value=[B@1ed6b0ae) AUTO_CONSUME({schemaVersion=,schemaType=BYTES}) ``` ### Anything else? In Pulsar 2.10.1 the Schema is again `BytesSchema`, so the bug was only introduced in 2.9.3 and does not affect 2.10 Maybe it is related to https://github.com/apache/pulsar/pull/15622? ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
