Skip to content

Partial-resume skips the wrong bytes in the buffered uploader #6683

Open

Description

@coryan

Unconfirmed. This is the result of a search with Claude, may be a false positive.

After a 308 Resume Incomplete response with persisted_size strictly inside the current chunk, handle_partial must drop the first s already-persisted bytes of a Bytes element of length n.

However, in src/storage/src/storage/perform_upload/buffered/progress.rs:

self.offset = persisted_size;
self.remainder = self
.buffer
.drain(0..)

The code performs b.split_off(n - s), which returns the last s bytes rather than dropping the first s bytes and retaining the remaining n - s bytes. Unless s == n / 2, the resent data contains the wrong bytes and the wrong length, corrupting the object payload upon completion.

Activity

  1. added
    type: bug
    api: storage
    on Sep 7, 2026
  2. akasakariko commented on Nov 25, 2026

    @akasakariko
    Contributor

    I'd like to work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: storagetype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions