chore(dsraft): sprinkle shard bootstrap process with tracepoints

This commit is contained in:
Andrew Mayorov 2024-08-05 20:14:16 +02:00
parent 26ddc403c8
commit 42e4a635e0
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
1 changed files with 3 additions and 1 deletions

View File

@ -363,9 +363,11 @@ init({DB, Shard, Opts}) ->
handle_continue(bootstrap, St = #st{bootstrapped = true}) ->
{noreply, St};
handle_continue(bootstrap, St0) ->
handle_continue(bootstrap, St0 = #st{db = DB, shard = Shard, stage = Stage}) ->
?tp(emqx_ds_replshard_bootstrapping, #{db => DB, shard => Shard, stage => Stage}),
case bootstrap(St0) of
St = #st{bootstrapped = true} ->
?tp(emqx_ds_replshard_bootstrapped, #{db => DB, shard => Shard}),
{noreply, St};
St = #st{bootstrapped = false} ->
{noreply, St, {continue, bootstrap}};