Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local: handle canceled uploads #1023

Merged
merged 1 commit into from
May 30, 2019
Merged

Conversation

tonistiigi
Copy link
Member

When the transfer of local sources is canceled or errors, checksum calculation is left in undefined state. After another build completes the transfer, the checksums may not correspond to the actual data on disk. With this quick patch, we always clean up the ref on error so next build starts from empty state. Later this could be optimized, for example do a full scan instead.

The reason this didn't show up very often is because of the lru cache for cache context. If cache was looked up from lru it still had the previous incomplete state that matched the disk state in 99% of cases(depending on where exactly the error happened).

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tiborvass tiborvass merged commit 5aa12ca into moby:master May 30, 2019
@tiborvass
Copy link
Collaborator

Ping @AkihiroSuda feel free to review post merge, you may catch something I haven't seen.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants