We had a number of problems with the read-while-write logic.
#1) you can't set background fill config options to keep background fill from behaving badly because they are shared too much with read-while-write
#2) logic around filling range requests out of partial cache entries is too restrictive
#3) issues around read_while_write not working if there is a transform anywhere
#4) some related config is not overridable
So we think that our patch fixes all of these issues...mostly.
(The background fill timeout doesn't get re-instated if a download switches to read-while-write and then back. The Range is in cache code doesn't seem write for small things or possibly for seeing the current fragment that is only partially downloaded.)
But we would like some review of this to see if we are doing anything dangerous/not right/not helpful.
Might also help TS-2761 and issue around range handling.