@@ -34,10 +34,10 @@ use core::time::Duration;
3434use prometheus:: { Histogram , IntCounter , IntGauge } ;
3535use spacetimedb_auth:: identity:: ConnectionAuthCtx ;
3636use spacetimedb_datastore:: db_metrics:: DB_METRICS ;
37- use spacetimedb_datastore:: system_tables:: st_inbound_msg_id_result_status;
3837use spacetimedb_datastore:: error:: { DatastoreError , ViewError } ;
3938use spacetimedb_datastore:: execution_context:: { self , ReducerContext , Workload } ;
4039use spacetimedb_datastore:: locking_tx_datastore:: { FuncCallType , MutTxId , ViewCallInfo } ;
40+ use spacetimedb_datastore:: system_tables:: st_inbound_msg_id_result_status;
4141use spacetimedb_datastore:: traits:: { IsolationLevel , Program } ;
4242use spacetimedb_execution:: pipelined:: PipelinedProject ;
4343use spacetimedb_lib:: buffer:: DecodeError ;
@@ -423,7 +423,11 @@ impl<T: WasmModule> WasmModuleHostActor<T> {
423423
424424 pub fn create_instance ( & self ) -> WasmModuleInstance < T :: Instance > {
425425 let common = & self . common ;
426- let env = InstanceEnv :: new ( common. replica_ctx ( ) . clone ( ) , common. scheduler ( ) . clone ( ) , common. idc_sender ( ) ) ;
426+ let env = InstanceEnv :: new (
427+ common. replica_ctx ( ) . clone ( ) ,
428+ common. scheduler ( ) . clone ( ) ,
429+ common. idc_sender ( ) ,
430+ ) ;
427431 // this shouldn't fail, since we already called module.create_instance()
428432 // before and it didn't error, and ideally they should be deterministic
429433 let mut instance = self
@@ -933,9 +937,7 @@ impl InstanceCommon {
933937 } ;
934938 let res = lifecycle_res. and ( dedup_res) ;
935939 match res {
936- Ok ( ( ) ) => {
937- ( EventStatus :: Committed ( DatabaseUpdate :: default ( ) ) , return_value)
938- }
940+ Ok ( ( ) ) => ( EventStatus :: Committed ( DatabaseUpdate :: default ( ) ) , return_value) ,
939941 Err ( err) => {
940942 let err = err. to_string ( ) ;
941943 log_reducer_error (
@@ -997,9 +999,7 @@ impl InstanceCommon {
997999 // record the failure in st_inbound_msg_id in a separate tx (since the reducer tx
9981000 // was rolled back). This allows the sending database to receive the error on dedup
9991001 // rather than re-running the reducer.
1000- if let ( Some ( ( sender_identity, sender_msg_id) ) , EventStatus :: FailedUser ( err) ) =
1001- ( dedup_sender, & event. status )
1002- {
1002+ if let ( Some ( ( sender_identity, sender_msg_id) ) , EventStatus :: FailedUser ( err) ) = ( dedup_sender, & event. status ) {
10031003 let err_msg = err. clone ( ) ;
10041004 let mut dedup_tx = stdb. begin_mut_tx ( IsolationLevel :: Serializable , Workload :: Internal ) ;
10051005 if let Err ( e) = dedup_tx. upsert_inbound_last_msg_id (
0 commit comments