Copilot commented on code in PR #1422:
URL: https://github.com/apache/pulsar-client-go/pull/1422#discussion_r2340043287
##########
pulsar/producer_partition.go:
##########
@@ -902,6 +904,14 @@ func (p *partitionProducer) writeData(buffer
internal.Buffer, sequenceID uint64,
now := time.Now()
ctx, cancel := context.WithCancel(context.Background())
buffer.Retain()
+ conn := p._getConn()
+ if p.getProducerState() == producerReady {
+ // If the producer in reconnecting, we should not write
to the connection.
+ // We just need to push the buffer to the pending
queue, it will be sent during the reconnecting.
+ conn.WriteData(ctx, buffer)
+ } else {
+ p.log.Debug("Skipping write to connection, producer
state: ", p.getProducerState())
+ }
Review Comment:
Comment line 909 contains a grammatical error: 'If the producer in
reconnecting' should be 'If the producer is reconnecting'.
--
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]