Skip to content

Fix serving uncompressed blob as compressed#691

Merged
mostynb merged 2 commits intobuchgr:masterfrom
AlessandroPatti:apatti/zstd-legacy-fix
Aug 30, 2023
Merged

Fix serving uncompressed blob as compressed#691
mostynb merged 2 commits intobuchgr:masterfrom
AlessandroPatti:apatti/zstd-legacy-fix

Conversation

@AlessandroPatti
Copy link
Copy Markdown
Contributor

@AlessandroPatti AlessandroPatti commented Aug 29, 2023

The pipe is created but never written to nor closed. Instead, the file is passed as writer to the encoder, causing errors like the following when serving zstd compressed blob when using uncompressed storage:

2023/08/29 18:58:44 Error while closing encoder: write /private/tmp/cache/cas.v2/4d/4d42748448b9cf8484bfea1e5df65e33213fcc85bba393ae4f3ebebd627523c0-144750847.v1: bad file descriptor
2023/08/29 18:58:44 Error writing cas/4d42748448b9cf8484bfea1e5df65e33213fcc85bba393ae4f3ebebd627523c0 err: write /private/tmp/cache/cas.v2/4d/4d42748448b9cf8484bfea1e5df65e33213fcc85bba393ae4f3ebebd627523c0-144750847.v1: bad file descriptor
2023/08/29 18:58:44  GET 500       127.0.0.1 /cas/4d42748448b9cf8484bfea1e5df65e33213fcc85bba393ae4f3ebebd627523c0

@AlessandroPatti AlessandroPatti force-pushed the apatti/zstd-legacy-fix branch 2 times, most recently from 658bfb1 to 9f89c40 Compare August 29, 2023 20:00
Copy link
Copy Markdown
Collaborator

@mostynb mostynb left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@mostynb mostynb merged commit da088f9 into buchgr:master Aug 30, 2023
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.

2 participants