poorbarcode commented on code in PR #24178:
URL: https://github.com/apache/pulsar/pull/24178#discussion_r2057588702
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java:
##########
@@ -889,8 +897,15 @@ private void tryRegisterSchema(ClientCnx cnx, MessageImpl
msg, SendCallback call
Throwable t = FutureUtil.unwrapCompletionException(ex);
log.warn("[{}] [{}] GetOrCreateSchema error", topic,
producerName, t);
if (t instanceof
PulsarClientException.IncompatibleSchemaException) {
- msg.setSchemaState(MessageImpl.SchemaState.Broken);
- callback.sendComplete(t, null);
Review Comment:
Main change 1:
- The original implementation called `OpSendMsg.callbaclk.sendComplete()`
here, it triggers a `recycle` of `OpSendMsg.callback`, but the object
`OpSendMsg` is still in `producer. pendingMessages`, which may cause
`OpSendMsg.callback` will be concurrently used.
--
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]