You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "RobertIndie (via GitHub)" <gi...@apache.org> on 2025/12/08 09:28:37 UTC
[PR] fix: change producer reconnect error logs to warn logs [pulsar-client-go]
RobertIndie opened a new pull request, #1445:
URL: https://github.com/apache/pulsar-client-go/pull/1445
### Motivation
During producer reconnection, retryable errors are currently logged at the error level. These cases are expected and should not be treated as hard failures. They should be logged at the warning level instead.
### Modifications
* Change producer reconnect error logs from error to warning level
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API: (yes / no)
- The schema: (yes / no / don't know)
- The default values of configurations: (yes / no)
- The wire protocol: (yes / no)
### Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: change producer reconnect error logs to warn logs [pulsar-client-go]
Posted by "thomas-bousquet (via GitHub)" <gi...@apache.org>.
thomas-bousquet commented on PR #1445:
URL: https://github.com/apache/pulsar-client-go/pull/1445#issuecomment-3633514555
Thanks for changing the log level, so far we were changing from `ERROR` to `WARN` level with the client wrapper we built around the Go Pulsar client.
I believe these 2 messages could probably be changed as well"
1. `Failed to create consumer at reconnect`
2. `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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: change producer reconnect error logs to warn logs [pulsar-client-go]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: change producer reconnect error logs to warn logs [pulsar-client-go]
Posted by "crossoverJie (via GitHub)" <gi...@apache.org>.
crossoverJie merged PR #1445:
URL: https://github.com/apache/pulsar-client-go/pull/1445
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org