Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[disk] drain any remaining data before Put returns
io.PipeWriter Write calls block until all the data written in the call is read from the corresponding io.PipeReader. If we don't read all that data, then the writing goroutine will block forever. The PipeWriter used in bytestream Write calls is intended to be consumed by disk.Put(), but if that returns early then there will be blocked writes. To un-block them, we should ensure that any remaining data is drained before disk.Put returns. Backport of #474
- Loading branch information