Skip to content

feat: add payload offloading to GCS read/write paths#2407

Merged
pjenvey merged 6 commits into
masterfrom
feat/gcs-offload-STOR-579
Jul 1, 2026
Merged

feat: add payload offloading to GCS read/write paths#2407
pjenvey merged 6 commits into
masterfrom
feat/gcs-offload-STOR-579

Conversation

@pjenvey

@pjenvey pjenvey commented Jun 22, 2026

Copy link
Copy Markdown
Member

Description

via a new payload_link column (currently Spanner only)

Issue(s)

Closes STOR-578
Closes STOR-579

@pjenvey pjenvey force-pushed the feat/gcs-offload-STOR-579 branch 2 times, most recently from c708557 to e946ec3 Compare June 23, 2026 00:39
@pjenvey pjenvey marked this pull request as ready for review June 23, 2026 00:39
via a new payload_link column (currently Spanner only)

Closes STOR-578
Closes STOR-579
@pjenvey pjenvey force-pushed the feat/gcs-offload-STOR-579 branch from e946ec3 to 081276c Compare June 23, 2026 20:01
Comment thread syncserver/src/web/handlers.rs
Comment thread syncserver/src/web/payload_offload.rs
chenba
chenba previously approved these changes Jun 25, 2026

@chenba chenba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

r+wc

👍 Patch looks good. I have a question about data loss on BSO. Maybe I missed something or it can be addressed separately.

@pjenvey

pjenvey commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

I have a question about data loss on BSO. Maybe I missed something or it can be addressed separately.

I'll note that Barry's question pointed out a bug on updates which 920588e fixed

Comment thread syncserver/src/web/transaction.rs
Comment thread syncserver/src/web/transaction.rs
handle_not_found(db.get_bsos(params).await).map_err(Into::into)
},
async |mut bsos: Paginated<results::GetBso>| {
for bso in bsos.items.iter_mut() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe not an issue, but If any single download_payload error hits, wouldn't the whole get_collection?full=1 response return 500, even though the DB read succeeded? Acceptable for v1, where one bad/missing object takes down the entire collection fetch.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's right -- I don't think there's any alternative? If we can't fulfill the request it should fail (we can't partially give back results e.g.).

user_id.fxa_uid,
collection,
bso_id,
Uuid::new_v4().hyphenated()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just gonna take note that we're planning on applying a UUID suffix at the end here? So for every new upload/PUT, there's a unique UUID? Reasonable for it making things unique, but I know we were thinking about how exactly to manage the lifecycle rules and this might factor into that decision. Necessary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It needs to be unique as the UPDATE path adds a new GCS object -- there could be multiple GCS objects for a BSO at any time (but of course only one canonical one Spanner's payload_link). I'm totally not attached to this specific filename format otherwise.

Comment thread syncserver/src/web/payload_offload.rs

@taddes taddes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🚀

@pjenvey pjenvey merged commit a22fc76 into master Jul 1, 2026
24 checks passed
@pjenvey pjenvey deleted the feat/gcs-offload-STOR-579 branch July 1, 2026 17:59
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.

3 participants