Commit 6d2779d
ENH: Improve zarr upload retry resilience and diagnostics
- Batch-level retry backoff: replace linear sleep(1*N) with exponential
backoff (5s, 20s, 40s, 80s, 120s) plus random jitter, giving S3 time
to recover from throttling
- Reduce parallelism on batch retry: halve ThreadPoolExecutor workers on
each retry (5→3→2→1), reducing concurrent connections that may trigger
S3 prefix-level throttling
- Better failure diagnostics in _handle_failed_items_and_raise: log a
summary line with failed/total counts, exception types grouped by count,
and a "systematic" flag when all failures share the same exception type.
This makes it immediately clear whether failures are random (flaky
network) or deterministic (server-side issue)
Motivated by investigation of #1821 where a previously-aborted OME-Zarr
upload consistently fails with ConnectionAbortedError on every retry
attempt for all 188 level-0 chunks (100% failure rate, 2259 connection
attempts), while level-1 chunks and other fresh zarr uploads succeed fine
from the same machine.
Co-Authored-By: Claude Code 2.1.81 / Claude Opus 4.6 <noreply@anthropic.com>1 parent fa33e8d commit 6d2779d
1 file changed
Lines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
745 | 748 | | |
746 | 749 | | |
747 | 750 | | |
| 751 | + | |
748 | 752 | | |
749 | 753 | | |
750 | 754 | | |
| |||
774 | 778 | | |
775 | 779 | | |
776 | 780 | | |
777 | | - | |
| 781 | + | |
778 | 782 | | |
779 | 783 | | |
780 | 784 | | |
| |||
817 | 821 | | |
818 | 822 | | |
819 | 823 | | |
| 824 | + | |
820 | 825 | | |
821 | 826 | | |
822 | | - | |
| 827 | + | |
| 828 | + | |
823 | 829 | | |
824 | 830 | | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
825 | 839 | | |
826 | | - | |
827 | | - | |
828 | 840 | | |
829 | 841 | | |
830 | 842 | | |
| |||
899 | 911 | | |
900 | 912 | | |
901 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
902 | 926 | | |
903 | 927 | | |
904 | 928 | | |
| |||
0 commit comments