Commit ae97d02
authored
Stop retrying get-workflow-history with an impossibly-short timeout (#1171)
* Stop retrying get-workflow-history with an impossibly-short timeout
Previously, when a `GetWorkflow(...).Get(...)` call timed out while waiting
for the workflow to complete, this happened:
- N-1 requests of the default long-poll timeout occurred, and it correctly retried
- The final request would have something like 5 seconds left, so it performs that call
- The server gives up the request *slightly before* that timeout so it can return the
next page token for a future request to use (as happened in the N-1 earlier requests)
- Since no history was received and there's still time left in the context (~50ms
internally), another impossibly-short request was sent
- This request fails immediately with a "insufficient time for long poll request" error.
- *This bad-request error* is what is returned from `Get(...)`
Which is pretty clearly sub-optimal.
Both because we sent a request that is almost guaranteed to fail, and because the error
returned to the caller is fairly generic looking / doesn't describe what happened.
What happened is that we ran out of time.
So this now returns a DeadlineExceeded error, like any other timeout, and does not
cause that final request to occur.1 parent 2f29329 commit ae97d02
File tree
2 files changed
+75
-0
lines changed- internal
2 files changed
+75
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| 515 | + | |
515 | 516 | | |
516 | 517 | | |
517 | 518 | | |
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
521 | 527 | | |
522 | 528 | | |
523 | 529 | | |
| |||
546 | 552 | | |
547 | 553 | | |
548 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
549 | 562 | | |
550 | 563 | | |
551 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
296 | 358 | | |
297 | 359 | | |
298 | 360 | | |
| |||
0 commit comments