Closed rukai closed 2 weeks ago
Comparing rukai:kafka_sink_cluster_set_state
(3ee31a0) with main
(307bb10)
❌ 1
regressions
✅ 38
untouched benchmarks
:warning: _Please fix the performance issues or acknowledge them on CodSpeed._
Benchmark | main |
rukai:kafka_sink_cluster_set_state |
Change | |
---|---|---|---|---|
❌ | encode_system.local_result_v5_no_compression |
92.9 µs | 104.9 µs | -11.47% |
What's the performance regression about?
its for a cassandra benchmark, definitely just noise
This PR:
KafkaNode::state
field toNodeState::Down
whenever a connection error is encountered.To enable this a
Connections::handle_connection_error
method is added. This method is called anytime a connection error occurs.It creates a new connection to check if the node is broken. If the connection fails the node is marked as down and
Err(..)
is returned, otherwise the old connection is replaced with the new connection andOk(())
is returned.It is then up to the caller (send/receive/control_send_receive) to decide how to handle this success or failure.
Succesfully reopened outgoing connection but previous outgoing connection had pending requests.
error since it always has a pending request (thats why its receiving!)handle_connection_error
first to check if the original node is bad or just the connection, then it proceeds to try new nodes without going through handle_connection_error. It can recover from issues at any point since control_send_receive is used for internal shotover requests.