@@ -16,7 +16,7 @@ use bytes::Bytes;
1616use restate_sdk_shared_core:: {
1717 AttachInvocationTarget , AwaitResponse , CoreVM , Error , Header , HeaderMap , NonEmptyValue ,
1818 NotificationHandle , PayloadOptions , ResponseHead , RetryPolicy , RunExitResult , State ,
19- TakeOutputResult , Target , TerminalFailure , UnresolvedFuture , VMOptions , Value , Version , VM ,
19+ TakeOutputResult , Target , TerminalFailure , UnresolvedFuture , VMOptions , Value , VM ,
2020} ;
2121use serde:: { Deserialize , Serialize } ;
2222use std:: borrow:: Cow ;
@@ -273,12 +273,15 @@ fn vm_is_ready_to_execute(rc_vm: &Rc<RefCell<WasmVM>>) -> IsReadyReturn {
273273#[ export_name = "vm_state" ]
274274pub unsafe extern "C" fn _vm_state ( vm_pointer : * const RefCell < WasmVM > ) -> u32 {
275275 let rc_vm = vm_ptr_to_rc ( vm_pointer) ;
276- let state: State = tracing:: dispatcher:: with_default ( & tracing:: Dispatch :: none ( ) , || {
277- VM :: state ( & rc_vm. borrow ( ) . vm )
278- } ) ;
276+ // We need to make sure we don't log stuff here, because this method is called by the java logger
277+ let state = tracing:: dispatcher:: with_default ( & tracing:: Dispatch :: none ( ) , || vm_state ( & rc_vm) ) ;
279278 state as u8 as u32
280279}
281280
281+ fn vm_state ( rc_vm : & Rc < RefCell < WasmVM > > ) -> State {
282+ VM :: state ( & rc_vm. borrow ( ) . vm )
283+ }
284+
282285#[ export_name = "vm_do_progress" ]
283286pub unsafe extern "C" fn _vm_do_progress (
284287 vm_pointer : * const RefCell < WasmVM > ,
0 commit comments