Commit 2a4b6bd
committed
Handle crashed member in quorum queue status
`ra:key_metrics/1` can return a very small metrics map in case a
member is dead and it terminated so early that it hasn't recorded any
counters yet.
In this edge case the `quorum_status` command used to crash, although
returning status of other members is still useful.
```
$ rabbitmq-queues quorum_status <queue>
Status of quorum queue <queue> on node rabbit@<host> ...
Error:
{{:case_clause, %{state: :noproc, membership: :unknown, machine_version: 6}}, [{:rabbit_quorum_queue, :"-status/2-lc$^0/1-0-", 2, [file: ~c"src/rabbit_quorum_queue.erl", line: 1252]}, {:rabbit_quorum_queue, :"-status/2-lc$^0/1-0-", 2, [file: ~c"src/rabbit_quorum_queue.erl", line: 1311]}, {:rabbit_quorum_queue, :status, 2, []}]}
```1 parent 6e7cb4d commit 2a4b6bd
File tree
2 files changed
+49
-6
lines changed- deps/rabbit
- src
- test
2 files changed
+49
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1276 | 1276 | | |
1277 | 1277 | | |
1278 | 1278 | | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1279 | 1293 | | |
1280 | 1294 | | |
1281 | 1295 | | |
| |||
1304 | 1318 | | |
1305 | 1319 | | |
1306 | 1320 | | |
1307 | | - | |
| 1321 | + | |
1308 | 1322 | | |
1309 | 1323 | | |
1310 | 1324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
4014 | 4015 | | |
4015 | 4016 | | |
4016 | 4017 | | |
4017 | | - | |
| 4018 | + | |
4018 | 4019 | | |
4019 | | - | |
| 4020 | + | |
4020 | 4021 | | |
4021 | 4022 | | |
4022 | 4023 | | |
| |||
4047 | 4048 | | |
4048 | 4049 | | |
4049 | 4050 | | |
4050 | | - | |
4051 | | - | |
4052 | | - | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
4053 | 4054 | | |
4054 | 4055 | | |
4055 | 4056 | | |
| |||
4058 | 4059 | | |
4059 | 4060 | | |
4060 | 4061 | | |
| 4062 | + | |
| 4063 | + | |
| 4064 | + | |
| 4065 | + | |
| 4066 | + | |
| 4067 | + | |
| 4068 | + | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
| 4076 | + | |
| 4077 | + | |
| 4078 | + | |
| 4079 | + | |
| 4080 | + | |
| 4081 | + | |
| 4082 | + | |
| 4083 | + | |
| 4084 | + | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
| 4088 | + | |
| 4089 | + | |
4061 | 4090 | | |
4062 | 4091 | | |
4063 | 4092 | | |
| |||
0 commit comments