Skip to content

Commit

Permalink
Abort on the commit log not being able to consume (#124)
Browse files Browse the repository at this point in the history
We now abort if there are problems read from the commit log. All bets are off. If a problem occurs due to the data format having changed then it is on the programmer to upgrade the deserialisation.
  • Loading branch information
huntc authored Nov 14, 2023
1 parent e36cc6d commit c99ee5c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions akka-persistence-rs-commitlog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use akka_persistence_rs::{
use async_stream::stream;
use async_trait::async_trait;
use chrono::{DateTime, Utc};
use log::warn;
use serde::{de::DeserializeOwned, Serialize};
use std::{io, marker::PhantomData, pin::Pin, sync::Arc};
use streambed::{
Expand Down Expand Up @@ -358,7 +357,7 @@ where
);
}
Err(e) => {
warn!("When initially consuming: {e:?}");
panic!("When initially consuming: {e:?}. Having to abort as this is unrecoverable.");
}
}
}
Expand Down Expand Up @@ -398,7 +397,7 @@ where
);
}
Err(e) => {
warn!("When consuming: {e:?}");
panic!("When consuming: {e:?}. Having to abort as this is unrecoverable.");
}
}
}
Expand Down

0 comments on commit c99ee5c

Please sign in to comment.