liangyepianzhou commented on PR #17449:
URL: https://github.com/apache/pulsar/pull/17449#issuecomment-1298563345

   > No, if we have active producers or consumers. The new schema might break 
the existing producer and consumers because they are using the byte[] schema in 
this case. The main reason is the client side will not upload the byte[] schema.
   
   @codelipenghui Yes, I have taken this into consideration as well and have 
given a suggestion:
   If there is a byte[] schema for a topic, then we do not hope it has another 
schema.
   That is to say, byte[] schema is a valid schema that is exclusive. So we 
need to store it and mark this topic as `hasSchema`. 
   
   > And store the schema of the byte[]
   > >    if (si != null && (SchemaType.BYTES == si.getType() || 
SchemaType.NONE == si.getType())) {
   >             // don't set schema for Schema.BYTES
   >             si = null;
   >         }
   > 
   > change it to 
   > >   if (si != null && SchemaType.NONE == si.getType()) {
   >             // don't set schema for Schema.BYTES
   >             si = null;
   >         }
   >  


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

Reply via email to