فهرست منبع

fix(conf): Wait for the cluster RPC shard

ieQu1 3 سال پیش
والد
کامیت
f5d63c1555
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 2 0
      apps/emqx_conf/src/emqx_cluster_rpc.erl
  2. 1 1
      apps/emqx_conf/src/emqx_conf.app.src

+ 2 - 0
apps/emqx_conf/src/emqx_cluster_rpc.erl

@@ -262,6 +262,8 @@ fast_forward_to_commit(Node, ToTnxId) ->
 
 %% @private
 init([Node, RetryMs]) ->
+    %% Workaround for https://github.com/emqx/mria/issues/94:
+    mria_rlog:wait_for_shards([?CLUSTER_RPC_SHARD], 1000),
     _ = mria:wait_for_tables([?CLUSTER_MFA, ?CLUSTER_COMMIT]),
     {ok, _} = mnesia:subscribe({table, ?CLUSTER_MFA, simple}),
     State = #{node => Node, retry_interval => RetryMs},

+ 1 - 1
apps/emqx_conf/src/emqx_conf.app.src

@@ -1,6 +1,6 @@
 {application, emqx_conf, [
     {description, "EMQX configuration management"},
-    {vsn, "0.1.1"},
+    {vsn, "0.1.2"},
     {registered, []},
     {mod, {emqx_conf_app, []}},
     {applications, [kernel, stdlib]},