diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-06-09 13:45:43 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-06-09 13:45:43 +0100 |
| commit | 0071a21def22ecb1e368be8699f52a11bf6a6b45 (patch) | |
| tree | 3997dcd5a5cdf390242e9346121898b51e0a7dd2 /include | |
| parent | ef1e9b01f3e9c1d823ee186471135623d0c090d3 (diff) | |
| download | rabbitmq-server-git-0071a21def22ecb1e368be8699f52a11bf6a6b45.tar.gz | |
Make decorators field in exchange and queue transient, i.e. we recalcualte it on recovery in case plugins have changed. Also document a bit more clearly what the lifecycle is of the different fields in these records since that area is becoming confusing.
Diffstat (limited to 'include')
| -rw-r--r-- | include/rabbit.hrl | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl index 5ac3197ed9..a0e96d87e4 100644 --- a/include/rabbit.hrl +++ b/include/rabbit.hrl @@ -39,13 +39,24 @@ -record(resource, {virtual_host, kind, name}). --record(exchange, {name, type, durable, auto_delete, internal, arguments, - scratches, policy, decorators}). --record(exchange_serial, {name, next}). +%% fields described as 'transient' here are cleared when writing to +%% rabbit_durable_<thing> +-record(exchange, { + name, type, durable, auto_delete, internal, arguments, %% immutable + scratches, %% durable, explicitly updated via update_scratch/3 + policy, %% durable, implicitly updated when policy changes + decorators}). %% transient, recalculated in store/1 (i.e. recovery) + +-record(amqqueue, { + name, durable, auto_delete, exclusive_owner = none, %% immutable + arguments, %% immutable + pid, %% durable (just so we know home node) + slave_pids, sync_slave_pids, %% transient + policy, %% durable, implicit update as above + gm_pids, %% transient + decorators}). %% transient, recalculated as above --record(amqqueue, {name, durable, auto_delete, exclusive_owner = none, - arguments, pid, slave_pids, sync_slave_pids, policy, - gm_pids, decorators}). +-record(exchange_serial, {name, next}). %% mnesia doesn't like unary records, so we add a dummy 'value' field -record(route, {binding, value = const}). |
