Skip to content

Multipart upload abort can leave orphaned upload sessions when LakeFS abort fails #4196

@xuang7

Description

@xuang7

What happened?

When a user aborts a multipart upload, abortMultipartUpload calls LakeFS to abort the remote multipart upload before deleting the upload session from the database. If the LakeFS call fails (e.g., 400 invalid address signature, physical address expired), the DB session is not deleted. Because the entire operation runs inside withTransaction, the transaction is rolled back, leaving an orphaned session in the database.

Expected behavior
The upload session should be cleaned up from the database when the user requests an abort, regardless of whether the LakeFS abort succeeds or fails.

How to reproduce?

  1. Start a multipart upload.
  2. Interrupt the upload mid-way and force the LakeFS abort to fail (manually modify the session's physical address in the database).
  3. Click Abort.
  4. If LakeFS rejects the abort, the session remains in the dataset_upload_session table.
  5. Subsequent uploads/resume attempts for the same file may encounter the orphaned session.

Version

1.1.0-incubating (Pre-release/Master)

Commit Hash (Optional)

No response

What browsers are you seeing the problem on?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagePending for triaging

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions