Conversation
/api/process/start now writes a "pending" job record before enqueueing process_and_upload and passes the job id to the task. Previously the record was only created once an orchestration worker picked the task up, which can take minutes while KEDA schedules the job and pulls the image, so the running uploads page showed no jobs in the meantime. update_job_status now carries "status" forward when an update omits it, like user_id and datastack_name, so the task's "Workflow Chain Initialized" update does not drop the pending status. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add a process:cluster_staging_tables step between monitor_spatial_workflow_completion and transfer_to_production that runs CLUSTER ... USING <pkey> and ANALYZE on the staging annotation and segmentation tables. transfer_table_using_pg_dump copies rows with pg_dump, which reads them in physical order, into an emptied production table, so production tables come out in id order without clustering the production database. The spatial lookup writes segmentation rows in spatial chunk order, so that table in particular was not in id order before. Clustering only changes row order, so a failure is logged and the upload continues to the transfer unclustered. pg_dump now runs with synchronize_seqscans=off so a concurrent scan cannot start the copy partway through a large table, and each production table is marked CLUSTER ON its primary key after its indices are rebuilt, so a later plain CLUSTER keeps the id order. Table and index names in the new SQL are quoted, so mixed-case names work there, unlike the existing unquoted transfer SQL. Move the upload job status tests into a class: the conftest ordering hook requires class-based tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bdpedigo
reviewed
Oct 2, 2026
| pg_env = os.environ.copy() | ||
| if db_info["password"]: | ||
| pg_env["PGPASSWORD"] = db_info["password"] | ||
| # pg_dump copies rows in the source table's physical order, which preserves the id |
Contributor
There was a problem hiding this comment.
is this modifying something global to postgres? just wary of that after the recent bug i caused with something similar
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.
this will make the large table uploads clustered on primary ID on the annotation and segmentation table to speed up joins