diff options
author | Emile Joubert <emile@rabbitmq.com> | 2011-03-31 12:07:17 +0100 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2011-03-31 12:07:17 +0100 |
commit | ba51aa80666fedded2c71ee57fe233906fa795a0 (patch) | |
tree | 93f9047eb6e6dfc2a6fc64befe9cefb8ff64c253 | |
parent | a4c348672a43acd05303a38af8c08196924fb650 (diff) | |
download | rabbitmq-server-ba51aa80666fedded2c71ee57fe233906fa795a0.tar.gz |
Don't transform markers when upgrading messagesbug24008
-rw-r--r-- | src/rabbit_msg_store.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index bb26de64..9b8ddae0 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -2007,7 +2007,10 @@ transform_msg_file(FileOld, FileNew, TransformFun) -> rabbit_msg_file:scan( RefOld, filelib:file_size(FileOld), fun({MsgId, _Size, _Offset, BinMsg}, ok) -> - {ok, MsgNew} = TransformFun(binary_to_term(BinMsg)), + {ok, MsgNew} = case binary_to_term(BinMsg) of + <<>> -> {ok, <<>>}; %% dying client marker + Msg -> TransformFun(Msg) + end, {ok, _} = rabbit_msg_file:append(RefNew, MsgId, MsgNew), ok end, ok), |