Explorar el Código

Merge pull request #14394 from thalesmg/20241211-r58-fix-ds-msg-serializer-props

fix(ds msg serializer): handle missing properties when deserializing
Thales Macedo Garitezi hace 1 año
padre
commit
2ce3a1bf31

+ 2 - 0
apps/emqx_durable_storage/src/emqx_ds_msg_serializer.erl

@@ -371,6 +371,7 @@ asn1_deserialize_misc(MiscData, Message0) ->
                     fun(Props) ->
                         maps:put(binary_to_term(Key), binary_to_term(Val), Props)
                     end,
+                    #{binary_to_term(Key) => binary_to_term(Val)},
                     Headers0
                 ),
                 Acc#message{headers = Headers};
@@ -381,6 +382,7 @@ asn1_deserialize_misc(MiscData, Message0) ->
                     fun(Props) ->
                         maps:put(Key, Val, Props)
                     end,
+                    #{Key => Val},
                     Headers0
                 ),
                 Acc#message{headers = Headers};

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

@@ -2,7 +2,7 @@
 {application, emqx_durable_storage, [
     {description, "Message persistence and subscription replays for EMQX"},
     % strict semver, bump manually!
-    {vsn, "0.4.2"},
+    {vsn, "0.4.3"},
     {modules, []},
     {registered, []},
     {applications, [kernel, stdlib, rocksdb, gproc, mria, emqx_utils, gen_rpc]},