You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some logs got lost.
How to reproduce:
-> Change tcp_server.rs handle_message to add some logs:
module_handle_messages! {
on_bus self.bus,
Ok((tcp_stream, addr)) = tcp_listener.accept() => {
tracing::error!("New connection from: {:?}", addr);
println!("New connection from: {:?}", addr);
let r = rand::random::<u64>();
let sender: &tokio::sync::broadcast::Sender<TcpServerMessage> = self.bus.get();
let sender = sender.clone();
readers.spawn(async move {
let mut framed = Framed::new(tcp_stream, LengthDelimitedCodec::new());
loop {
match read_stream(&mut framed).await {
Ok(TcpServerNetMessage::NewTx(tx)) => {
tracing::error!("Received new transaction from: {:?}, r = {}", addr, r);
let tx_hash = tx.hash();
sender.send(TcpServerMessage::NewTx(tx))?;
// TODO: Wrap resp in a TcpServerMessageResponse enum ?
framed.get_mut().write_all(tx_hash.0.as_bytes()).await?;
},
Ok(TcpServerNetMessage::Ping) => {
framed.get_mut().write_all(b"Pong").await?;
},
Err(e) => { bail!("Error reading stream: {}", e); }
};
}
});
}
}
-> Comment the tokio::time::sleep in loadtest lib file
-> In loadtest, change number_of_task to only keep 2 (for readability)
-> Run load test. You should now be able to see that multiple transactions have been received, while there is only one log of new connection. You should also see the println of the connection without its associated log
The text was updated successfully, but these errors were encountered:
Some logs got lost.
How to reproduce:
-> Change tcp_server.rs handle_message to add some logs:
-> Comment the
tokio::time::sleep
in loadtest lib file-> In loadtest, change number_of_task to only keep 2 (for readability)
-> Run load test. You should now be able to see that multiple transactions have been received, while there is only one log of new connection. You should also see the println of the connection without its associated log
The text was updated successfully, but these errors were encountered: