Skip to content

Commit

Permalink
keepalive: trace in case of success
Browse files Browse the repository at this point in the history
cpp-rust-driver tests sometimes depend upon logs emitted by the driver.
HeartbeatTests are on of them. Tests look for a following log:
`logger_.add_critera("Heartbeat completed on host " + ccm_->get_ip_prefix());`.

Before this commit, rust-driver was not emitting any logs in case of
keepalive request success. I think it's not a bad idea to add a trace log
here, considering that keepalive intervals are rather long (default is 30s).

Obviously, the logger criteria will need to
be adjusted in `cpp-rust-driver` tests as well.
  • Loading branch information
muzarski committed Oct 16, 2024
1 parent f9a3635 commit 3a0ca2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scylla/src/transport/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1839,6 +1839,11 @@ impl Connection {
);
return Err(err);
}

trace!(
"Keepalive request successful on connection to node {}",
node_address
);
}
} else {
// No keepalives are to be sent.
Expand Down

0 comments on commit 3a0ca2e

Please sign in to comment.