Commit 2953276
authored
Failsafe mode wasn't always triggered in case of Etcd unavailability (patroni#3404)
During heartbeat cycle Patroni does two requests to Etcd:
1. get_cluster()
2. update_lock()
If request fails with one Etcd node Patroni switches to another node and retries. At the same time it sets a flag that Etcd topology must be rediscovered. Rediscovery happens either after successfully completing current request or before executing the next request.
In the second case etcd.EtcdException raised by topology discovery functions wasn't handled and as a result of that failsafe_mode wasn't triggered.
Close patroni#34031 parent 5c2e0fd commit 2953276
2 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
321 | 326 | | |
322 | 327 | | |
323 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
214 | 217 | | |
215 | 218 | | |
216 | 219 | | |
| |||
0 commit comments