Commit 4b4d446
authored
Return missing instead of internal error for checkpoints that haven't been fully stored yet (#24244)
## Description
In the indexer logs we see `Retrying due to error: Failed to fetch
checkpoint 211394366: status: 'Internal error'` at the tip-of-chain when
a checkpoint hasn't been fully stored yet. This should be a "Not Found"
rather than an "Internal Error." This is especially important because
the indexing framework retries with exponential back off on internal
errors but linear back off on "Not Found" so returning an Internal Error
is actually increasing lag.
## Test plan
None really 🙈. It's kind of tough to write a unit test because this
requires calling the API at the exact instant where the checkpoint
exists but the effects haven't been stored yet.
## Release notes
Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.
For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.
- [x] gRPC: Return "Not Found" for new checkpoints that haven't been
fully stored yet instead of "Internal Error."1 parent 9454c23 commit 4b4d446
File tree
2 files changed
+20
-16
lines changed- crates
- sui-rpc-api/src
- sui-types/src/storage
2 files changed
+20
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
68 | 75 | | |
69 | | - | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | 167 | | |
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
172 | | - | |
| 171 | + | |
173 | 172 | | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
| 191 | + | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 250 | + | |
254 | 251 | | |
255 | 252 | | |
256 | 253 | | |
| |||
380 | 377 | | |
381 | 378 | | |
382 | 379 | | |
383 | | - | |
| 380 | + | |
384 | 381 | | |
385 | 382 | | |
386 | 383 | | |
| |||
498 | 495 | | |
499 | 496 | | |
500 | 497 | | |
501 | | - | |
| 498 | + | |
502 | 499 | | |
503 | 500 | | |
504 | 501 | | |
| |||
616 | 613 | | |
617 | 614 | | |
618 | 615 | | |
619 | | - | |
| 616 | + | |
620 | 617 | | |
621 | 618 | | |
622 | 619 | | |
| |||
0 commit comments