summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-07-08 15:30:53 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2010-07-08 15:30:53 +0100
commit8bfd1a054be9ec05bddf6fc8339a16366cc71876 (patch)
tree9da6bcf77846321863f2ce75f1b2c53e2074069d
parent6b4377154da24d33d1258798171f1201cbe0027b (diff)
downloadrabbitmq-server-git-8bfd1a054be9ec05bddf6fc8339a16366cc71876.tar.gz
don't force storing of binary properties
see also bug 22957.
-rw-r--r--src/rabbit_variable_queue.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index 04ec96287d..9d830cc086 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -823,11 +823,6 @@ betas_from_index_entries(List, TransientThreshold, IndexState) ->
rabbit_queue_index:ack(Acks,
rabbit_queue_index:deliver(Delivers, IndexState))}.
-ensure_binary_properties(Msg = #basic_message { content = Content }) ->
- Msg #basic_message {
- content = rabbit_binary_parser:clear_decoded_content(
- rabbit_binary_generator:ensure_content_encoded(Content)) }.
-
%% the first arg is the older delta
combine_deltas(?BLANK_DELTA_PATTERN(X), ?BLANK_DELTA_PATTERN(Y)) ->
?BLANK_DELTA;
@@ -1075,8 +1070,11 @@ maybe_write_msg_to_disk(Force, MsgStatus = #msg_status {
with_msg_store_state(
MSCState, IsPersistent,
fun (MsgStore, MSCState2) ->
- rabbit_msg_store:write(
- MsgStore, Guid, ensure_binary_properties(Msg), MSCState2)
+ Msg1 = Msg #basic_message {
+ %% don't persist any recoverable decoded properties
+ content = rabbit_binary_parser:clear_decoded_content(
+ Msg #basic_message.content)},
+ rabbit_msg_store:write(MsgStore, Guid, Msg1, MSCState2)
end),
{MsgStatus #msg_status { msg_on_disk = true }, MSCState1};
maybe_write_msg_to_disk(_Force, MsgStatus, MSCState) ->