Skip to content

fix(service): Start resumable upload expiry at commit - #731

Draft
sentry-junior[bot] wants to merge 1 commit into
mainfrom
junior/fs-564-resumable-commit-expiry
Draft

sentry-junior[bot] wants to merge 1 commit into
mainfrom
junior/fs-564-resumable-commit-expiry

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

A resumable upload's deadline was fixed at session creation, so a short TTL could expire before the upload committed.

Now, for an upload starting at T, completing at T + D, with TTL L:

  • Creation: the LT blob gets T + L, as before. The token carries the ExpirationPolicy instead of the deadline.
  • Commit: before writing the HV tombstone, set_expiry(At(now + L)) moves the blob to T + D + L. The tombstone uses the confirmed deadline. If LT doesn't confirm, no tombstone is written.
  • ExpiryUpdate::include_expired: this is a new parameter that lets that call update a blob that's already logically expired, i.e. past T + L. Only GCS, local-fs and in-memory LT honor it. The public set_expiry and the other backends return Unsupported.

Notes:

  • Old tokens lack the required expiration_policy and are rejected, so sessions open at deploy time must restart.
  • If T + L passed by more than about a day before commit, there is a tiny chance that GCS runs exactly after the commit and the object is already physically gone when we attempt to bump its expiry. In that case, we fail the commit.

Closes FS-564

via @lcian.

--

View Junior Session [Sentry]

@linear-code

linear-code Bot commented Oct 22, 2026

Copy link
Copy Markdown

FS-564

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.66443% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.04%. Comparing base (96d9a96) to head (f43e791).

Files with missing lines Patch % Lines
objectstore-service/src/backend/in_memory.rs 97.61% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #731      +/-   ##
==========================================
+ Coverage   91.91%   92.04%   +0.13%     
==========================================
  Files         117      117              
  Lines       24141    24420     +279     
==========================================
+ Hits        22189    22478     +289     
+ Misses       1952     1942      -10     
Components Coverage Δ
Rust Backend 95.05% <99.66%> (+0.12%) ⬆️
Rust Client 82.86% <ø> (ø)
Python Client 93.73% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sentry-junior
sentry-junior Bot force-pushed the junior/fs-564-resumable-commit-expiry branch from 86b6587 to 085c0db Compare October 23, 2026 09:06
The long-term blob of a resumable upload keeps the deadline resolved at
session creation. When the final chunk lands, the blob's deadline is moved
to the commit time plus the policy's duration before the HV tombstone is
written with the confirmed deadline.

The blob may already be past its initial deadline at that point, so
ExpiryUpdate gains an explicit include_expired flag that the long-term
backends with resumable uploads (GCS, local-fs, in-memory) honor. Other
backends and the public tiered set_expiry reject it as unsupported.

The session token now carries the required ExpirationPolicy, so tokens
issued before this change fail to decode instead of committing without an
expiry.

Fixes FS-564

Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
@sentry-junior
sentry-junior Bot force-pushed the junior/fs-564-resumable-commit-expiry branch from e608df4 to f43e791 Compare October 23, 2026 09:49
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.

1 participant