@@ -505,10 +505,15 @@ execute_operation(State, {kill_wal}) ->
505
505
506
506
log (" ~s Killing WAL on member ~w ...~n " , [timestamp (), NodeName ]),
507
507
508
- Pid = erpc :call (NodeName , erlang , whereis , [ra_log_wal ]),
509
- erpc :call (NodeName , erlang , exit , [Pid , kill ]),
510
- State #{operations_count => OpCount + 1 ,
511
- successful_ops => SuccessOps + 1 }
508
+ case erpc :call (NodeName , erlang , whereis , [ra_log_wal ]) of
509
+ Pid when is_pid (Pid ) ->
510
+ erpc :call (NodeName , erlang , exit , [Pid , kill ]),
511
+ State #{operations_count => OpCount + 1 ,
512
+ successful_ops => SuccessOps + 1 };
513
+ _ ->
514
+ State
515
+ end
516
+
512
517
end ;
513
518
514
519
execute_operation (State , {kill_member }) ->
@@ -529,13 +534,17 @@ execute_operation(State, {kill_member}) ->
529
534
530
535
log (" ~s Killing member ~w ...~n " , [timestamp (), Member ]),
531
536
532
- Pid = erpc :call (NodeName , erlang , whereis , [? CLUSTER_NAME ]),
533
- erpc :call (NodeName , erlang , exit , [Pid , kill ]),
534
- % % give it a bit of time after a kill in case this member is chosen
535
- % % for the next operation
536
- timer :sleep (100 ),
537
- State #{operations_count => OpCount + 1 ,
538
- successful_ops => SuccessOps + 1 }
537
+ case erpc :call (NodeName , erlang , whereis , [? CLUSTER_NAME ]) of
538
+ Pid when is_pid (Pid ) ->
539
+ erpc :call (NodeName , erlang , exit , [Pid , kill ]),
540
+ % % give it a bit of time after a kill in case this member is chosen
541
+ % % for the next operation
542
+ timer :sleep (100 ),
543
+ State #{operations_count => OpCount + 1 ,
544
+ successful_ops => SuccessOps + 1 };
545
+ _ ->
546
+ State
547
+ end
539
548
end .
540
549
541
550
-spec wait_for_applied_index_convergence ([ra :server_id ()], non_neg_integer ()) -> ok .
0 commit comments