You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/05/22 02:16:04 UTC
[GitHub] [pulsar-client-go] yarthur1 opened a new issue #259: problem about sendRequest fail to add batchbuilder
yarthur1 opened a new issue #259:
URL: https://github.com/apache/pulsar-client-go/issues/259
#### Expected behavior
when I view producer send section source code,the partitionProducer func internalSend only log err after fail to add batchbuilder, should n't callback and release publishSemaphore? the partitionProducer Send and SendAsync could block always?
and why Send individually not retry like sendasbatch, it could be fail add in the first time
someone can tell me why? thanks
func (p *partitionProducer) internalSend(request *sendRequest) {
`
// after flushing try again to add the current payload
if ok := p.batchBuilder.Add(smm, sequenceID, msg.Payload, request,
msg.ReplicationClusters, deliverAt); !ok {
p.log.WithField("size", len(msg.Payload)). //只是记录错误? 不用callback和释放信号?
WithField("sequenceID", sequenceID).
WithField("properties", msg.Properties).
Error("unable to add message to batch")
}
}
} else {
// Send individually
if added := p.batchBuilder.Add(smm, sequenceID, msg.Payload, request,
msg.ReplicationClusters, deliverAt); !added {
p.log.WithField("size", len(msg.Payload)).
WithField("sequenceID", sequenceID).
WithField("properties", msg.Properties).
Error("unable to send single message")
}
p.internalFlushCurrentBatch()
}
`
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [pulsar-client-go] yarthur1 closed issue #259: problem about sendRequest fail to add batchbuilder
Posted by GitBox <gi...@apache.org>.
yarthur1 closed issue #259:
URL: https://github.com/apache/pulsar-client-go/issues/259
----------------------------------------------------------------
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:
users@infra.apache.org