Browse Source

fix(dsrepl): Treat all exceptions from storage layer as recoverable

ieQu1 1 year atrás
parent
commit
1ffc7d5d9e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      apps/emqx_durable_storage/src/emqx_ds_replication_layer.erl

+ 5 - 1
apps/emqx_durable_storage/src/emqx_ds_replication_layer.erl

@@ -566,7 +566,11 @@ list_nodes() ->
         EXPR
     catch
         error:RPCError__ = {erpc, _} ->
-            {error, recoverable, RPCError__}
+            {error, recoverable, RPCError__};
+        %% Note: remote node never _throws_ unrecoverable errors, so
+        %% we can assume that all exceptions are transient.
+        EC__:RPCError__:Stack__ ->
+            {error, recoverable, #{EC__ => RPCError__, stacktrace => Stack__}}
     end
 ).