Repository navigation
A source's queued status and its sync job commit together, so a failed job insert no longer leaves the source stuck as queued - #1451
Conversation
WaylandYang
left a comment
There was a problem hiding this comment.
Thanks, the fix is right. Please retitle to a sentence stating the behaviour, e.g. "A source's queued status and its sync job commit together, so a failed job insert no longer leaves the source stuck as queued". Please also keep only the failure/rollback regressions (the concurrent and Drive follow-up cases cover unchanged behaviour), drop the trigger and function when the test finishes instead of leaving them on jobs, and write the test comments in Chinese.
|
这个修复本身是对的,还是想合进去。但 10-26 提的四条到现在都没动,而且 #1474、#1455、#1427、#1359 已经改了
如果不想继续,说一声,我自己把 |
Signed-off-by: Floating-Y <118035379+Floating-Y@users.noreply.github.com>
d9bb2c8 to
594c90b
Compare
|
Sorry for the delay. I've addressed all five points and pushed commit 594c90b: rebased onto dev, updated the title, kept only the two failure/rollback regressions, added trigger/function cleanup, and changed the test comments to Chinese. Both regressions pass, and I verified that no injection triggers or functions remain afterward. The PR description includes the updated validation results. Thanks for the feedback—it's ready for another review. |
Why
A failed
sync_sourceinsert can leave a source committed asqueuedand prevent later scheduling.What changes
Commit the queued-state update, task insertion and notification in one transaction for initial, manual and scheduled sync. Preserve Drive's additional sync request while queued/running and its independent configuration save.
Keep only two failure/rollback regressions: manual HTTP sync and Drive selection. Fault injection is limited to each fixture source. Each test drops its trigger and function before propagating failed checks; test comments are Chinese.
Existing orphan states need separate reviewed recovery. Checkpoints, completion states and retry budgets are unchanged.
How it was checked
Rebased onto
devate964eb4f; commit594c90bb. Windows, Rust 1.98.0, dedicated PostgreSQL 16/pgvector with 112 migrations;UTOPIA_TEST_REQUIRE_DB=1andUTOPIA_TEST_REQUIRE_PDFTOTEXT=1were set.test_reject_source_sync%triggers and functions afterward.cargo clippy --workspace --all-targets -- -D warningspassed.cargo test --locked --workspace --no-fail-fast -- --test-threads=1: 1,823 harness OK, one failure, six pre-existing ignored tests. The sole failure was the upstream CLI restore test requiring missing localpg_dump. After supplying real PostgreSQL 16.11 clients,cargo test --locked -p utopia-cli --test restore -- --test-threads=1passed all 13 tests, including real database backup/restore. Assertions were unchanged.pnpm install --frozen-lockfileandpnpm buildpassed.Optional external database/service probes and opt-in tests were not provisioned and are not claimed as real integration coverage. The workspace run used one harness thread, Poppler 26.09.0 with CJK data and process-only localhost proxy bypass.
Before review