Commit 983ce6f
authored
fix: remove blocking catchup flush (#821)
The original idea for this code was to detect if any flushing futures
were in progress when the next continuous flush occurs and then to drive
those synchronously.
The problem is that this can cause unexpected timeouts if latency is
high and the function is quite busy/creating lots of data. In those
cases we may have a longer than usual flush for one of the telemetry
types (as there are multiple simultaneous requests, divided into the
maximum batch size). This then causes us to block and wait to ensure the
last flush succeeds and then we immediately create another flush task.
This should be fast but in some cases, creates so many futures that we
don't adequately poll the `/next` event and can time out.
For now, this change will allow those flush tasks to run in the
background. On the shutdown event we drive all to completion anyway, so
this change should result in eventually consistent data.1 parent 7bfe4df commit 983ce6f
1 file changed
+1
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
602 | 601 | | |
603 | 602 | | |
604 | 603 | | |
| |||
651 | 650 | | |
652 | 651 | | |
653 | 652 | | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
| 653 | + | |
666 | 654 | | |
667 | 655 | | |
668 | 656 | | |
| |||
723 | 711 | | |
724 | 712 | | |
725 | 713 | | |
726 | | - | |
727 | 714 | | |
728 | 715 | | |
729 | 716 | | |
| |||
0 commit comments