diff options
| author | Luke Bakken <luke@bakken.io> | 2019-04-29 14:18:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-29 14:18:24 -0700 |
| commit | 80df800a688440d047885c977578af38b6699760 (patch) | |
| tree | 82e677fe6b4f8480ffebe6d957aab1860eccf450 /src | |
| parent | ba831a6a747b3bbe51f7b380ef22bcf33be19a8f (diff) | |
| parent | c8d86008b4c6a9a911d9a8bae6421f555e457bd6 (diff) | |
| download | rabbitmq-server-git-80df800a688440d047885c977578af38b6699760.tar.gz | |
Merge pull request #1994 from rabbitmq/rabbitmq-server-1980
Reset overflow queue property to drop-head if policy is unset.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 9149df0015..b3f89b7ef0 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -474,8 +474,12 @@ init_max_bytes(MaxBytes, State) -> {_Dropped, State1} = maybe_drop_head(State#q{max_bytes = MaxBytes}), State1. -init_overflow(undefined, State) -> +%% Reset overflow to default 'drop-head' value if it's undefined. +init_overflow(undefined, #q{overflow = 'drop-head'} = State) -> State; +init_overflow(undefined, State) -> + {_Dropped, State1} = maybe_drop_head(State#q{overflow = 'drop-head'}), + State1; init_overflow(Overflow, State) -> OverflowVal = binary_to_existing_atom(Overflow, utf8), case OverflowVal of |
