Use bounded server-side GCS copies for Core relocation tables - #32792
Closed
Nils-Fedrigo wants to merge 2 commits into
Closed
Nils-Fedrigo wants to merge 2 commits into
Nils-Fedrigo wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
Slimmed variant of the original change: inline the copy loop in the activity using the existing concurrentExecutor and FileStorage.copyFile, and use destination existence (server-side copies are atomic) as the retry checkpoint instead of a metadata comparison. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace per-data-source Storage Transfer Service job creation for Core table files with bounded server-side Cloud Storage copies. Follow-up to #32789 and #32790: skipping empty prefixes alone does not reduce create-quota usage enough for the ongoing relocation.
startTransferCoreTableFilesand the existing workflow command sequence unchanged. New invocations returnnullonly after all listed objects have been copied and verified (or a successful empty listing). The existing null completion path is already deployed.transferJobs/...handles recorded in Temporal history continue to be polled by the unchanged STS implementation. Front public/private file transfers remain on STS.getAllFilesByPrefix; preserve relative names under the source-to-destination Core ID mapping.FileStorage.copyFilefor server-side copy/rewrite and its retry logic. No CSV payload is downloaded into the worker.Tests
copy_core_tables.ts; passed.git diff --check; passed. Reviewed the complete local diff after a shallow main clone.Risk
IAM prerequisite: existing source Object Viewer access is sufficient for reading, but the US worker must additionally have destination object read/create/delete access. The earlier read-only infra PR dust-tt/dust-infra#1116 does not provide that cross-region write access. Without it, the new activity will fail/retry before completion. No IAM changes are made by this PR.
Consistency: requires the relocation maintenance/write freeze on both source and destination. Source generations are pinned within each attempt; there is no durable manifest across attempts, so source writes must remain frozen. No source objects are deleted. Verified retries compare contents (CRC32C and size), not arbitrary metadata equality; new copies use the existing SDK copy behavior.
Timeout/size limits: the existing activity timeout remains ten minutes to avoid changing running workflow commands. The eight-minute guard does not abort an individual long-running GCS rewrite or listing. Very large objects may still hit the timeout, and very large prefixes may spend too long listing or checking already copied objects. Listing is paginated but accumulates object metadata in memory. This is a bounded-copy emergency path, not a general streaming bulk-migration engine. Validate representative large sources before broad rollout; do not claim deadline guarantees from this PR.
Concurrency: the limit is per activity, so aggregate copy traffic scales with activity slots/replicas and active data sources. Start at current worker capacity and observe GCS and Core health before scaling further. SDK copies already in flight can finish after a worker/activity timeout; immutable source data and destination verification make retries convergent.
Compatibility/rollback: no workflow resets or command changes.
getBucketInstancecaches by bucket name, so deploy fresh worker processes. Rollback must retain the existingnullhandling from #32789. Rolling back the copying activity returns future work to STS and consumes its create quota again. Coordinate rollback/grant removal with in-flight activities.Deploy Plan
This changes IAM and must be intentionally applied/reconciled in Terraform. It permits destination object reads/writes/deletes, not just listing. Other relocation directions require their own grants; this activity change applies to new table-copy activities generally.
[GCS Copy] Table file copies completed and verified.and advancing Core batch cursors. Existing STS jobs may still run/poll; new table-copy activities should not create STS jobs.