Skip to content

Commit 4a09c64

Browse files
committed
Merge branch 'slim-down-state' into remove-slot-mutex
2 parents dba9a4c + 7a9be84 commit 4a09c64

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/store/fs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,9 @@ impl entity_manager::Params for EmParams {
223223

224224
async fn on_shutdown(
225225
state: entity_manager::ActiveEntityState<Self>,
226-
_cause: entity_manager::ShutdownCause,
226+
cause: entity_manager::ShutdownCause,
227227
) {
228+
trace!("persist {:?} due to {cause:?}", state.id);
228229
state.persist().await;
229230
}
230231
}

src/store/fs/bao_file.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,11 @@ impl BaoFileStorage {
519519
}
520520
}
521521

522-
/// A cheaply cloneable handle to a bao file, including the hash and the configuration.
522+
/// A cheaply cloneable handle to a bao file.
523+
///
524+
/// You must call [Self::persist] to write the bitfield to disk, if you want to persist
525+
/// the file handle, otherwise the bitfield will not be written to disk and will have
526+
/// to be reconstructed on next use.
523527
#[derive(Debug, Clone, Default, derive_more::Deref)]
524528
pub(crate) struct BaoFileHandle(pub(super) watch::Sender<BaoFileStorage>);
525529

src/store/fs/util/entity_manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ mod main_actor {
407407
match e {
408408
mpsc::error::TrySendError::Full(cmd) => {
409409
let entity_actor::Command::Spawn(spawn) = cmd else {
410-
panic!()
410+
unreachable!()
411411
};
412412
warn!(
413413
"Entity actor inbox is full, cannot send command to entity actor {:?}.",
@@ -419,7 +419,7 @@ mod main_actor {
419419
}
420420
mpsc::error::TrySendError::Closed(cmd) => {
421421
let entity_actor::Command::Spawn(spawn) = cmd else {
422-
panic!()
422+
unreachable!()
423423
};
424424
error!(
425425
"Entity actor inbox is closed, cannot send command to entity actor {:?}.",

0 commit comments

Comments
 (0)