Commit bf3525b
committed
bugfix: S3C-3955 ignore errors from readRecords during LogReader setup
The getRaftLog route returns an error 500 when a queried raft session
is not in cache. This, when the queue populator had multiple raft
sessions to manage, caused the whole setup to fail if one of them
failed. Previously, before S3C-3835 was fixed, it happened during
regular cron job batches which only impacted the missing raft session
and logged an error without preventing progress from other raft
sessions.
The fix consists of not causing a global error on error 500 from one
raft session, and instead falling back to starting from log offset 1.
This looks acceptable as a quick fix, but it would be better to have
metadata return a proper success status whenever raft sessions are
missing from its cache, but the scope is larger hence this improvement
over the current fix is postponed for now. Another way could be to
internally retry fetching the offset while allowing the rest of the
log readers to fetch their respective raft session log, but this would
also be a significant change and does not look the best approach to me
either.1 parent 0d50c85 commit bf3525b
File tree
2 files changed
+47
-11
lines changed- lib/queuePopulator
- tests/unit/lib/queuePopulator
2 files changed
+47
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
156 | 168 | | |
157 | 169 | | |
158 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| |||
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
81 | 105 | | |
0 commit comments