Skip to content

Modified approach to Fix Zero Byte Uploads #1860

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarcusSorealheis
Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis commented Jul 8, 2025

Description

@chrisstaite reported issues with the zero bytes and the GCS store. I'm trying to understand why this wasn't resolved bya. previous test to address it.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I wrote a test. It needs to be tested on a live GCP instance. I'm currently on a plane with limited bandwidth.

Checklist

  • Updated documentation if needed
  • Tests added/amended
  • bazel test //... passes locally
  • PR is contained in a single commit, using git amend see some docs

This change is Reviewable

@amankrx
Copy link
Collaborator

amankrx commented Jul 10, 2025

Maybe we can do a simple upload at the beginning for a zero byte uploads. The problem appears to be that the loop breaks without initializing the upload session. So, a simple zero-byte upload in the beginning should solve this issue.


Ok(())
}
// I'll delete this but it did not actually test and prevent the issue we were addressing.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm assuming this is working as expected right?
The problem appears to be during zero byte uploads. The get operation should work fine in this case.
Let me test this out locally as well.

@MarcusSorealheis MarcusSorealheis changed the title Modified approach to prevent zero byte uploads Modified approach to Fix Zero Byte Uploads Jul 10, 2025
.err_tip(|| "Could not convert max_retry_buffer_size to u64")?,
);

// Special case for known zero-byte uploads: Start resumable and finalize immediately.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do a resumable upload if the exact size is zero. Wouldn't it be better to do a simple upload for a zero byte uploads.

@MarcusSorealheis MarcusSorealheis marked this pull request as draft July 10, 2025 19:52
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