@@ -636,12 +636,11 @@ cluster_restart(Config) ->
636636
637637 timer :sleep (1 ),
638638 RangesBeforeRecovery =
639- [ erpc :call (node (P ),
640- fun () ->
641- {ok , #{offset_ref := ORef }} = gen :call (P , '$gen_call' , get_reader_context ),
642- {atomics :get (ORef , 2 ), atomics :get (ORef , 1 )}
643- end )
644- || P <- [Leader , Replica1 , Replica2 ]],
639+ [begin
640+ #{committed_chunk_id := E ,
641+ first_chunk_id := S } = osiris :get_stats (P ),
642+ {S , E }
643+ end || P <- [Leader , Replica1 , Replica2 ]],
645644
646645 ? assertEqual ([{0 ,0 }, {0 ,0 }, {0 ,0 }], RangesBeforeRecovery ),
647646
@@ -655,12 +654,11 @@ cluster_restart(Config) ->
655654 % % get all log ranges after recovery for each member and validate they are all
656655 % % the same
657656 RangesAfterRecovery =
658- [ erpc :call (node (P ),
659- fun () ->
660- {ok , #{offset_ref := ORef }} = gen :call (P , '$gen_call' , get_reader_context ),
661- {atomics :get (ORef , 2 ), atomics :get (ORef , 1 )}
662- end )
663- || P <- [Leader1 , ReplicaPid1 , ReplicaPid2 ]],
657+ [begin
658+ #{committed_chunk_id := E ,
659+ first_chunk_id := S } = osiris :get_stats (P ),
660+ {S , E }
661+ end || P <- [Leader1 , ReplicaPid1 , ReplicaPid2 ]],
664662 ? assertEqual ([{0 ,0 }, {0 ,0 }, {0 ,0 }], RangesAfterRecovery ),
665663 ct :pal (" ~p ~p " , [RangesBeforeRecovery , RangesAfterRecovery ]),
666664 ok = validate_log_offset_reader (Leader1 , [{0 , <<" before-restart" >>}]),
0 commit comments