File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -728,7 +728,7 @@ impl<Clock: LogicalClock> CheckpointStateMachine<Clock> {
728728
729729 self . mvstore
730730 . storage
731- . on_checkpoint_start ( self . durable_txid_max_new ) ;
731+ . on_checkpoint_start ( self . durable_txid_max_new ) ? ;
732732
733733 if self . write_set . is_empty ( ) && self . index_write_set . is_empty ( ) {
734734 // Nothing to checkpoint, skip pager txn and go straight to WAL checkpoint.
@@ -1519,15 +1519,15 @@ impl<Clock: LogicalClock> StateTransition for CheckpointStateMachine<Clock> {
15191519 Err ( ref err) => {
15201520 self . mvstore
15211521 . storage
1522- . on_checkpoint_end ( self . durable_txid_max_new , Err ( err. clone ( ) ) ) ;
1522+ . on_checkpoint_end ( self . durable_txid_max_new , Err ( err. clone ( ) ) ) ? ;
15231523 tracing:: debug!( "Error in checkpoint state machine: {err}" ) ;
15241524 self . cleanup_after_external_io_error ( ) ;
15251525 res
15261526 }
15271527 Ok ( TransitionResult :: Done ( ref result) ) => {
15281528 self . mvstore
15291529 . storage
1530- . on_checkpoint_end ( self . durable_txid_max_new , Ok ( result) ) ;
1530+ . on_checkpoint_end ( self . durable_txid_max_new , Ok ( result) ) ? ;
15311531 res
15321532 }
15331533 Ok ( result) => Ok ( result) ,
Original file line number Diff line number Diff line change @@ -52,11 +52,19 @@ pub trait DurableStorage: Send + Sync + Debug {
5252 /// Called when a checkpoint begins, before any rows are written to the B-tree.
5353 /// `durable_txid_max` is the transaction watermark that will be durably persisted
5454 /// once the checkpoint completes.
55- fn on_checkpoint_start ( & self , _durable_txid_max : u64 ) { }
55+ fn on_checkpoint_start ( & self , _durable_txid_max : u64 ) -> Result < ( ) > {
56+ Ok ( ( ) )
57+ }
5658
5759 /// Called after the checkpoint has fully completed: rows are flushed, WAL is
5860 /// truncated, and the logical log is reset.
59- fn on_checkpoint_end ( & self , _durable_txid_max : u64 , _result : Result < & CheckpointResult > ) { }
61+ fn on_checkpoint_end (
62+ & self ,
63+ _durable_txid_max : u64 ,
64+ _result : Result < & CheckpointResult > ,
65+ ) -> Result < ( ) > {
66+ Ok ( ( ) )
67+ }
6068}
6169
6270pub struct Storage {
You can’t perform that action at this time.
0 commit comments