Copilot commented on code in PR #1445:
URL: https://github.com/apache/pulsar-client-go/pull/1445#discussion_r2598915560
##########
pulsar/producer_partition.go:
##########
@@ -534,6 +533,7 @@ func (p *partitionProducer)
reconnectToBroker(connectionClosed *connectionClosed
p.doClose(errors.Join(ErrProducerFenced, err))
return struct{}{}, nil
}
+ p.log.WithError(err).Warn("Failed to reconnect to broker, will
retry later.")
Review Comment:
[nitpick] The log message "Failed to reconnect to broker, will retry later."
is inconsistent with similar patterns in the codebase. In the consumer
implementation (`consumer_partition.go:1938`), the corresponding log message is
"Failed to create consumer at reconnect", and in the transaction coordinator
(`transaction_coordinator_client.go:166`), it's "Failed to create transaction
handler at reconnect".
While the new message is more descriptive and user-friendly, consider
whether consistency across the codebase is more important. If this is an
intentional improvement, the same change should be applied to consumer and
transaction coordinator implementations as well.
```suggestion
p.log.WithError(err).Warn("Failed to create producer at
reconnect")
```
--
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]