diff --git a/src/lib/client_failover.c b/src/lib/client_failover.c index ab85f522..238b7722 100644 --- a/src/lib/client_failover.c +++ b/src/lib/client_failover.c @@ -388,8 +388,11 @@ bool xcecli_retry_next(api_ctx_t* ac, int* rc, bool is_write, int port = (ac->conf != NULL && cur >= 0 && cur < ac->conf->nmasters) ? ac->conf->master_ports[cur] : 0; - INFO("xcecli failover: attempt %d → %s:%d", st->attempt, - host ? host : "(null)", port); + /* bug-1850: include the status that triggered this rotation -- without + * it a log cannot tell a dead connection from a healthy primary's + * commit-timeout or admission-backpressure reply. */ + INFO("xcecli failover: attempt %d → %s:%d (after status=%d)", st->attempt, + host ? host : "(null)", port, *rc); /* ReconnectRejoinHook (1.2): a stateful consumer re-establishes its session * on the freshly-connected primary AFTER reconnect/recovery and BEFORE the