Skip to content

Commit 97494a7

Browse files
author
Tim Watson
committed
merge bug25537 into stable
2 parents 08877ef + ffeb160 commit 97494a7

File tree

83 files changed

+4624
-2253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+4624
-2253
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ TARGET_SRC_DIR=dist/$(TARBALL_NAME)
6464

6565
SIBLING_CODEGEN_DIR=../rabbitmq-codegen/
6666
AMQP_CODEGEN_DIR=$(shell [ -d $(SIBLING_CODEGEN_DIR) ] && echo $(SIBLING_CODEGEN_DIR) || echo codegen)
67-
AMQP_SPEC_JSON_FILES_0_9_1=$(AMQP_CODEGEN_DIR)/amqp-rabbitmq-0.9.1.json
67+
AMQP_SPEC_JSON_FILES_0_9_1=$(AMQP_CODEGEN_DIR)/amqp-rabbitmq-0.9.1.json $(AMQP_CODEGEN_DIR)/credit_extension.json
6868
AMQP_SPEC_JSON_FILES_0_8=$(AMQP_CODEGEN_DIR)/amqp-rabbitmq-0.8.json
6969

7070
ERL_CALL=erl_call -sname $(RABBITMQ_NODENAME) -e
@@ -162,7 +162,7 @@ $(BASIC_PLT): $(BEAM_TARGETS)
162162
else \
163163
dialyzer --output_plt $@ --build_plt \
164164
--apps erts kernel stdlib compiler sasl os_mon mnesia tools \
165-
public_key crypto ssl; \
165+
public_key crypto ssl xmerl; \
166166
fi
167167

168168
clean:

check_xref

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ shutdown(Rc, LibDir) ->
5050
check(Cwd, PluginsDir, LibDir, Checks) ->
5151
{ok, Plugins} = file:list_dir(PluginsDir),
5252
ok = file:make_dir(LibDir),
53+
put({?MODULE, third_party}, []),
5354
[begin
5455
Source = filename:join(PluginsDir, Plugin),
5556
Target = filename:join(LibDir, Plugin),
@@ -162,7 +163,8 @@ filters() ->
162163

163164
filter_chain(FnChain) ->
164165
fun(AnalysisResult) ->
165-
lists:foldl(fun(F, false) -> F(cleanup(AnalysisResult));
166+
Result = cleanup(AnalysisResult),
167+
lists:foldl(fun(F, false) -> F(Result);
166168
(_F, true) -> true
167169
end, false, FnChain)
168170
end.
@@ -267,14 +269,8 @@ source_file(M) ->
267269

268270
store_third_party(App) ->
269271
{ok, AppConfig} = application:get_all_key(App),
270-
case get({?MODULE, third_party}) of
271-
undefined ->
272-
put({?MODULE, third_party},
273-
proplists:get_value(modules, AppConfig));
274-
Modules ->
275-
put({?MODULE, third_party},
276-
proplists:get_value(modules, AppConfig) ++ Modules)
277-
end.
272+
AppModules = proplists:get_value(modules, AppConfig),
273+
put({?MODULE, third_party}, AppModules ++ get({?MODULE, third_party})).
278274

279275
%% TODO: this ought not to be maintained in such a fashion
280276
external_dependency(Path) ->

docs/rabbitmqctl.1.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,55 @@
446446
</para>
447447
</listitem>
448448
</varlistentry>
449+
<varlistentry>
450+
<term><cmdsynopsis><command>sync_queue</command> <arg choice="req">queue</arg></cmdsynopsis>
451+
</term>
452+
<listitem>
453+
<variablelist>
454+
<varlistentry>
455+
<term>queue</term>
456+
<listitem>
457+
<para>
458+
The name of the queue to synchronise.
459+
</para>
460+
</listitem>
461+
</varlistentry>
462+
</variablelist>
463+
<para>
464+
Instructs a mirrored queue with unsynchronised slaves to
465+
synchronise itself. The queue will block while
466+
synchronisation takes place (all publishers to and
467+
consumers from the queue will block). The queue must be
468+
mirrored for this command to succeed.
469+
</para>
470+
<para>
471+
Note that unsynchronised queues from which messages are
472+
being drained will become synchronised eventually. This
473+
command is primarily useful for queues which are not
474+
being drained.
475+
</para>
476+
</listitem>
477+
</varlistentry>
478+
<varlistentry>
479+
<term><cmdsynopsis><command>cancel_sync_queue</command> <arg choice="req">queue</arg></cmdsynopsis>
480+
</term>
481+
<listitem>
482+
<variablelist>
483+
<varlistentry>
484+
<term>queue</term>
485+
<listitem>
486+
<para>
487+
The name of the queue to cancel synchronisation for.
488+
</para>
489+
</listitem>
490+
</varlistentry>
491+
</variablelist>
492+
<para>
493+
Instructs a synchronising mirrored queue to stop
494+
synchronising itself.
495+
</para>
496+
</listitem>
497+
</varlistentry>
449498
</variablelist>
450499
</refsect2>
451500

@@ -1109,6 +1158,12 @@
11091158
i.e. those which could take over from the master without
11101159
message loss.</para></listitem>
11111160
</varlistentry>
1161+
<varlistentry>
1162+
<term>status</term>
1163+
<listitem><para>The status of the queue. Normally
1164+
'running', but may be "{syncing, MsgCount}" if the queue is
1165+
synchronising.</para></listitem>
1166+
</varlistentry>
11121167
</variablelist>
11131168
<para>
11141169
If no <command>queueinfoitem</command>s are specified then queue name and depth are

ebin/rabbit_app.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{frame_max, 131072},
2828
{heartbeat, 600},
2929
{msg_store_file_size_limit, 16777216},
30-
{queue_index_max_journal_entries, 262144},
30+
{queue_index_max_journal_entries, 65536},
3131
{default_user, <<"guest">>},
3232
{default_pass, <<"guest">>},
3333
{default_user_tags, [administrator]},
@@ -44,6 +44,7 @@
4444
{log_levels, [{connection, info}]},
4545
{ssl_cert_login_from, distinguished_name},
4646
{reverse_dns_lookups, false},
47+
{cluster_partition_handling, ignore},
4748
{tcp_listen_options, [binary,
4849
{packet, raw},
4950
{reuseaddr, true},

include/rabbit.hrl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727

2828
-record(vhost, {virtual_host, dummy}).
2929

30-
-record(connection, {protocol, user, timeout_sec, frame_max, vhost,
31-
client_properties, capabilities}).
32-
3330
-record(content,
3431
{class_id,
3532
properties, %% either 'none', or a decoded record/tuple
@@ -43,7 +40,7 @@
4340
-record(resource, {virtual_host, kind, name}).
4441

4542
-record(exchange, {name, type, durable, auto_delete, internal, arguments,
46-
scratches, policy}).
43+
scratches, policy, decorators}).
4744
-record(exchange_serial, {name, next}).
4845

4946
-record(amqqueue, {name, durable, auto_delete, exclusive_owner = none,
@@ -78,8 +75,7 @@
7875

7976
-record(event, {type, props, timestamp}).
8077

81-
-record(message_properties, {expiry, needs_confirming = false,
82-
delivered = false}).
78+
-record(message_properties, {expiry, needs_confirming = false}).
8379

8480
-record(plugin, {name, %% atom()
8581
version, %% string()
@@ -92,7 +88,6 @@
9288

9389
-define(COPYRIGHT_MESSAGE, "Copyright (C) 2007-2013 VMware, Inc.").
9490
-define(INFORMATION_MESSAGE, "Licensed under the MPL. See http://www.rabbitmq.com/").
95-
-define(PROTOCOL_VERSION, "AMQP 0-9-1 / 0-9 / 0-8").
9691
-define(ERTS_MINIMUM, "5.6.3").
9792

9893
%% EMPTY_FRAME_SIZE, 8 = 1 + 2 + 4 + 1

packaging/RPMS/Fedora/rabbitmq-server.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ done
123123
rm -rf %{buildroot}
124124

125125
%changelog
126+
* Wed May 1 2013 [email protected] 3.1.0-1
127+
- New Upstream Release
128+
126129
* Tue Dec 11 2012 [email protected] 3.0.1-1
127130
- New Upstream Release
128131

packaging/debs/Debian/debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
rabbitmq-server (3.1.0-1) unstable; urgency=low
2+
3+
* New Upstream Release
4+
5+
-- Simon MacMullen <[email protected]> Wed, 01 May 2013 11:57:58 +0100
6+
17
rabbitmq-server (3.0.1-1) unstable; urgency=low
28

39
* New Upstream Release

packaging/debs/Debian/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Standards-Version: 3.9.2
99

1010
Package: rabbitmq-server
1111
Architecture: all
12-
Depends: erlang-nox (>= 1:12.b.3), adduser, logrotate, ${misc:Depends}
12+
Depends: erlang-nox (>= 1:12.b.3) | esl-erlang, adduser, logrotate, ${misc:Depends}
1313
Description: AMQP server written in Erlang
1414
RabbitMQ is an implementation of AMQP, the emerging standard for high
1515
performance enterprise messaging. The RabbitMQ server is a robust and

packaging/standalone/Makefile

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
VERSION=0.0.0
2+
SOURCE_DIR=rabbitmq-server-$(VERSION)
3+
TARGET_DIR=rabbitmq_server-$(VERSION)
4+
TARGET_TARBALL=rabbitmq-server-$(OS)-standalone-$(VERSION)
5+
RLS_DIR=$(TARGET_DIR)/release/$(TARGET_DIR)
6+
7+
ERTS_VSN=$(shell erl -noshell -eval 'io:format("~s", [erlang:system_info(version)]), halt().')
8+
ERTS_ROOT_DIR=$(shell erl -noshell -eval 'io:format("~s", [code:root_dir()]), halt().')
9+
10+
# used to generate the erlang release
11+
RABBITMQ_HOME=$(TARGET_DIR)
12+
RABBITMQ_EBIN_ROOT=$(RABBITMQ_HOME)/ebin
13+
RABBITMQ_PLUGINS_DIR=$(RABBITMQ_HOME)/plugins
14+
RABBITMQ_PLUGINS_EXPAND_DIR=$(RABBITMQ_PLUGINS_DIR)/expand
15+
16+
RABBITMQ_DEFAULTS=$(TARGET_DIR)/sbin/rabbitmq-defaults
17+
fix_defaults = sed -e $(1) $(RABBITMQ_DEFAULTS) > $(RABBITMQ_DEFAULTS).tmp \
18+
&& mv $(RABBITMQ_DEFAULTS).tmp $(RABBITMQ_DEFAULTS)
19+
20+
dist:
21+
tar -zxf ../../dist/$(SOURCE_DIR).tar.gz
22+
23+
$(MAKE) -C $(SOURCE_DIR) \
24+
TARGET_DIR=`pwd`/$(TARGET_DIR) \
25+
SBIN_DIR=`pwd`/$(TARGET_DIR)/sbin \
26+
MAN_DIR=`pwd`/$(TARGET_DIR)/share/man \
27+
install
28+
29+
## Here we set the RABBITMQ_HOME variable,
30+
## then we make ERL_DIR point to our released erl
31+
## and we add the paths to our released start_clean and start_sasl boot scripts
32+
$(call fix_defaults,'s:^SYS_PREFIX=$$:SYS_PREFIX=\$${RABBITMQ_HOME}:')
33+
$(call fix_defaults,'s:^ERL_DIR=$$:ERL_DIR=\$${RABBITMQ_HOME}/erts-$(ERTS_VSN)/bin/:')
34+
$(call fix_defaults,'s:start_clean$$:"\$${SYS_PREFIX}/releases/$(VERSION)/start_clean":')
35+
$(call fix_defaults,'s:start_sasl:"\$${SYS_PREFIX}/releases/$(VERSION)/start_sasl":')
36+
37+
chmod 0755 $(RABBITMQ_DEFAULTS)
38+
39+
mkdir -p $(TARGET_DIR)/etc/rabbitmq
40+
41+
$(MAKE) generate_release
42+
43+
mkdir -p $(RLS_DIR)
44+
tar -C $(RLS_DIR) -xzf $(RABBITMQ_HOME)/rabbit.tar.gz
45+
46+
# add minimal boot file
47+
cp $(ERTS_ROOT_DIR)/bin/start_clean.boot $(RLS_DIR)/releases/$(VERSION)
48+
cp $(ERTS_ROOT_DIR)/bin/start_sasl.boot $(RLS_DIR)/releases/$(VERSION)
49+
50+
# move rabbitmq files to top level folder
51+
mv $(RLS_DIR)/lib/rabbit-$(VERSION)/* $(RLS_DIR)
52+
53+
# remove empty lib/rabbit-$(VERSION) folder
54+
rm -rf $(RLS_DIR)/lib/rabbit-$(VERSION)
55+
56+
# fix Erlang ROOTDIR
57+
patch -o $(RLS_DIR)/erts-$(ERTS_VSN)/bin/erl $(RLS_DIR)/erts-$(ERTS_VSN)/bin/erl.src < erl.diff
58+
59+
tar -zcf $(TARGET_TARBALL).tar.gz -C $(TARGET_DIR)/release $(TARGET_DIR)
60+
rm -rf $(SOURCE_DIR) $(TARGET_DIR)
61+
62+
clean: clean_partial
63+
rm -f rabbitmq-server-$(OS)-standalone-*.tar.gz
64+
65+
clean_partial:
66+
rm -rf $(SOURCE_DIR)
67+
rm -rf $(TARGET_DIR)
68+
69+
.PHONY : generate_release
70+
generate_release:
71+
erlc \
72+
-I $(TARGET_DIR)/include/ -o src -Wall \
73+
-v +debug_info -Duse_specs -Duse_proper_qc \
74+
-pa $(TARGET_DIR)/ebin/ src/rabbit_release.erl
75+
erl \
76+
-pa "$(RABBITMQ_EBIN_ROOT)" \
77+
-pa src \
78+
-noinput \
79+
-hidden \
80+
-s rabbit_release \
81+
-extra "$(RABBITMQ_PLUGINS_DIR)" "$(RABBITMQ_PLUGINS_EXPAND_DIR)" "$(RABBITMQ_HOME)"
82+
rm src/rabbit_release.beam

packaging/standalone/erl.diff

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
20c20,21
2+
< ROOTDIR="%FINAL_ROOTDIR%"
3+
---
4+
> realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" ; }
5+
> ROOTDIR="$(dirname `realpath $0`)/../.."

0 commit comments

Comments
 (0)