Commit 204163f
authored
bug: Store message state in Redis to solve for some reliability state management issues (#1005)
Move the individual message state to Redis. This is to attempt to stop
some reliability counts from trending negative. This is after the code
paths were scrutinized to ensure that the struct cloning was minimized,
and some states (notably, ones where there was a hand-off between active
services) continued to trend negative.
Unfortunately, the currently available version of Redis is 7.2, so many
of the auto-expiring records (like
[HSETEX](https://redis.io/docs/latest/commands/hsetex/) are not present,
meaning that we'll have to use more keys, and use traditional `SET` with
an `EX`piration set. Fortunately, that should not be a problem, since
there appears to be plenty of available memory and CPU on the active
Redis servers.
The new approach _only_ updates counts if the prior state matches what
has been last recorded.
Closes: PUSH-5461 parent 43c3ad7 commit 204163f
File tree
3 files changed
+413
-52
lines changed- autoendpoint/src/extractors
- autopush-common/src
3 files changed
+413
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
238 | 242 | | |
239 | 243 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
0 commit comments