Skip to content

Conversation

@joshmgross
Copy link
Contributor

@joshmgross joshmgross commented Dec 13, 2019

To enable larger cache sizes, we're updating our internal APIs to prevent network timeouts that occur from the large single upload stream of the previous iteration.

Bumping the per cache limit to match the per repo limit, as that's the only limit we have now.

Copy link
Collaborator

@zarenner zarenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reserve before tarring up cache?

@joshmgross joshmgross force-pushed the joshmgross/chunked-upload branch from 7f6523f to 71d9426 Compare December 18, 2019 16:09
@joshmgross joshmgross marked this pull request as ready for review December 19, 2019 16:03
@zarenner
Copy link
Collaborator

zarenner commented Dec 19, 2019

Implement a (very small number of) retries as discussed, or did you decide not to?

@joshmgross
Copy link
Contributor Author

@zarenner I've added retries to the upload chunk requests

@joshmgross joshmgross changed the title [WIP] Chunked Cache Upload APIs Chunked Cache Upload APIs Dec 20, 2019
? fileSize - offset
: MAX_CHUNK_SIZE;
const start = offset;
const end = offset + chunkSize - 1;
Copy link
Contributor

@yacaovsnc yacaovsnc Dec 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when we try to upload a size 0 file, i.e. when end is -1, what happens?

Copy link
Contributor Author

@joshmgross joshmgross Dec 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case:
offset = 0, chunkSize = fileSize - offset = 1, end = 0, which is valid since the content range is inclusive

Is a size 0 file valid? I'd imagine something else will fail before it gets here

@joshmgross joshmgross merged commit b45d91c into master Jan 6, 2020
@joshmgross joshmgross deleted the joshmgross/chunked-upload branch January 6, 2020 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants