HTTP Stream listed in /renter/downloads endpoint
BUG REPORT
Right now, partial http streams are recorded in the in-memory list in siad. For example, if I watch a movie through Plex, and then query the /renter/downloads
endpoint, I will see the following:
{
{
"destination": "",
"destinationtype": "http stream",
"filesize": 4194304,
"length": 4194304,
"offset": 25165824,
"siapath": "movies/La.La.Land.2016.PROPER.MULTi.1080p.BluRay.x264-LOST-Obfuscated.mkv",
"completed": true,
"endtime": "2019-01-16T13:18:38.769651-05:00",
"error": "",
"received": 4194304,
"starttime": "2019-01-16T13:18:36.174277-05:00",
"starttimeunix": 1547662716174277000,
"totaldatatransferred": 12582912
},
{
"destination": "",
"destinationtype": "http stream",
"filesize": 4194304,
"length": 4194304,
"offset": 20971520,
"siapath": "movies/La.La.Land.2016.PROPER.MULTi.1080p.BluRay.x264-LOST-Obfuscated.mkv",
"completed": true,
"endtime": "2019-01-16T13:18:37.701265-05:00",
"error": "",
"received": 4194304,
"starttime": "2019-01-16T13:18:36.174164-05:00",
"starttimeunix": 1547662716174164000,
"totaldatatransferred": 12582912
},
{
"destination": "",
"destinationtype": "http stream",
"filesize": 4194304,
"length": 4194304,
"offset": 12582912,
"siapath": "movies/La.La.Land.2016.PROPER.MULTi.1080p.BluRay.x264-LOST-Obfuscated.mkv",
"completed": true,
"endtime": "2019-01-16T13:18:36.994106-05:00",
"error": "",
"received": 4194304,
"starttime": "2019-01-16T13:18:36.172625-05:00",
"starttimeunix": 1547662716172625000,
"totaldatatransferred": 12582912
},
{
"destination": "/Users/eddiewang/Desktop/test.mp4",
"destinationtype": "file",
"filesize": 791874923,
"length": 791874923,
"offset": 0,
"siapath": "movies/Shes.All.That.1999.720p.BluRay.x264.YIFY/Shes.All.That.1999.720p.BluRay.x264.YIFY.mp4",
"completed": true,
"endtime": "2019-01-16T13:12:09.560004-05:00",
"error": "",
"received": 791874923,
"starttime": "2019-01-16T13:10:50.346514-05:00",
"starttimeunix": 1547662250346514000,
"totaldatatransferred": 994050048
}
You can imagine this goes on for thousands of lines since we're reading tiny chunks with partial downloads. I assume eventually this will become a memory leak and cause issues. We don't really need "http stream" types to show up in this endpoint, or we should be able to filter it out.
Environment
- Sia version: 1.4.0 toxic
- OS: OSX