You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "PavelZeger (via GitHub)" <gi...@apache.org> on 2026/06/03 20:02:48 UTC

[PR] [fix][client] Log the underlying exception in ControlledClusterFailover.close [pulsar]

PavelZeger opened a new pull request, #25925:
URL: https://github.com/apache/pulsar/pull/25925

   Fixes #25898
   
   ### Motivation
   
   When `httpClient.close()` fails in `ControlledClusterFailover.close()`, the caught `IOException` was discarded - only a static `"Failed to close http client."` line was logged. An operator could not tell whether the failure was a `SocketTimeoutException`, a connection reset, or an internal error, each of which calls for a different remedy. Since this `close()` runs when a client transitions away from a cluster, it is often the only signal that the failover completed cleanly, so losing the cause hurts
   diagnosability.
   
   ### Modifications
   
   Attach the caught `IOException` to the log event via slog's `.exception(e)`, matching the logging pattern already used elsewhere in this class.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment


-- 
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