fix off-by-one in uploadstreamer with ss.Peek()

MERGE REQUEST

Overview

There was an off-by-one error in the upload streamer code where an extra chunk would be tagged onto a file if the stream provided exactly one chunk's worth of data, because an EOF would not be returned in time.

This adds a Peek() function to the StreamShard which checks that there is at least one more byte in the stream to justify making the next slice.

This makes a few other tweaks to the upload streamer that are in preparation of the sialinks and linkfiles.

Issues Closed

Checklist

Review and complete the checklist to ensure that the MR is complete before assigned to an approver.

  • All new methods, or updating methods have clear docstrings
  • Testing added or updated for new methods
  • Any new packages are added to Makefile and .gitlab-ci.yml
  • API documentation updated for API updates
  • Module README.md updated for changes to work flow
  • Issue added to Sia-UI repo for new supporting features
Edited by David Vorick

Merge request reports

Loading