Panic on unexpected error in simtests (#8169)

This commit is contained in:
Arthur Petukhovsky
2024-06-26 16:46:14 +01:00
committed by GitHub
parent 5af9660b9e
commit 3118c24521
2 changed files with 8 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ use crate::walproposer_sim::{
pub mod walproposer_sim;
// Generates 2000 random seeds and runs a schedule for each of them.
// If you seed this test fail, please report the last seed to the
// If you see this test fail, please report the last seed to the
// @safekeeper team.
#[test]
fn test_random_schedules() -> anyhow::Result<()> {

View File

@@ -21,7 +21,7 @@ use safekeeper::{
wal_storage::Storage,
SafeKeeperConf,
};
use tracing::{debug, info_span};
use tracing::{debug, info_span, warn};
use utils::{
id::{NodeId, TenantId, TenantTimelineId, TimelineId},
lsn::Lsn,
@@ -247,7 +247,12 @@ pub fn run_server(os: NodeOs, disk: Arc<SafekeeperDisk>) -> Result<()> {
NetEvent::Message(msg) => {
let res = conn.process_any(msg, &mut global);
if res.is_err() {
debug!("conn {:?} error: {:#}", connection_id, res.unwrap_err());
let e = res.unwrap_err();
let estr = e.to_string();
if !estr.contains("finished processing START_REPLICATION") {
warn!("conn {:?} error: {:?}", connection_id, e);
panic!("unexpected error at safekeeper: {:#}", e);
}
conns.remove(&connection_id);
break;
}