Commit 2d08d33
fix(shadows): bound delta ack so a lost ack can't strand an applied delta (#139)
apply_delta_and_ack persists the delta to local storage before publishing
the reported ack. If the link drops right after publish, the Update
Accepted/Rejected response is lost and AWS won't re-send it, so the ack
wait parked forever and wait_delta never returned — the caller never
learned the delta applied. Bound the ack (DELTA_ACK_TIMEOUT=30s); on
timeout keep the applied state and let the reported side reconcile on the
next sync.
Co-authored-by: Kenneth Sylvest Knudsen <ksk@factbird.com>1 parent f58f0af commit 2d08d33
1 file changed
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
| |||
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
120 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
121 | 152 | | |
122 | 153 | | |
123 | 154 | | |
| |||
0 commit comments