@@ -710,30 +710,12 @@ needs_timeout(#vqstate { index_state = IndexState,
710710 {false , true } -> false
711711 end .
712712
713- timeout (State = # vqstate { index_state = IndexState0 ,
714- store_state = StoreState0 ,
715- unconfirmed_simple = UCS ,
716- confirmed = C }) ->
717- IndexState = rabbit_classic_queue_index_v2 :sync (IndexState0 ),
718- StoreState = rabbit_classic_queue_store_v2 :sync (StoreState0 ),
719- State # vqstate { index_state = IndexState ,
720- store_state = StoreState ,
721- unconfirmed_simple = sets :new ([{version ,2 }]),
722- confirmed = sets :union (C , UCS ) }.
723-
724- handle_pre_hibernate (State = # vqstate { index_state = IndexState0 ,
725- store_state = StoreState0 ,
726- msg_store_clients = MSCState0 ,
727- unconfirmed_simple = UCS ,
728- confirmed = C }) ->
713+ timeout (State ) ->
714+ sync (State ).
715+
716+ handle_pre_hibernate (State = # vqstate { msg_store_clients = MSCState0 }) ->
729717 MSCState = msg_store_pre_hibernate (MSCState0 ),
730- IndexState = rabbit_classic_queue_index_v2 :flush (IndexState0 ),
731- StoreState = rabbit_classic_queue_store_v2 :sync (StoreState0 ),
732- State # vqstate { index_state = IndexState ,
733- store_state = StoreState ,
734- msg_store_clients = MSCState ,
735- unconfirmed_simple = sets :new ([{version ,2 }]),
736- confirmed = sets :union (C , UCS ) }.
718+ sync (State # vqstate { msg_store_clients = MSCState }).
737719
738720resume (State ) -> a (timeout (State )).
739721
0 commit comments