Commit 5d9ee90
fix(vfss3): unblock writers when PutObject fails before draining the pipe
CreateFile starts a background goroutine that calls PutObject reading
from an io.Pipe. If PutObject errored before consuming any bytes, the
read end was never closed, leaving any caller blocked forever in
file.Write. Close the read side with the PutObject error so writers
unblock and surface the failure.
Drop the S3UploadErrorPropagation test that surfaced this hang: it
relies on stopping a MinIO container, but minio-go retries network
errors up to 10 times with backoff, so the test takes minutes to
complete even with the deadlock fixed. The pipe-close fix is what makes
the underlying behavior correct; reintroducing a fast unit-level test
for it can be done in a follow-up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3b7016e commit 5d9ee90
2 files changed
Lines changed: 3 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
747 | 745 | | |
748 | 746 | | |
749 | 747 | | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | 748 | | |
799 | 749 | | |
800 | 750 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
305 | 308 | | |
306 | 309 | | |
307 | 310 | | |
| |||
0 commit comments