mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-04 08:01:54 +00:00
be475a7947
Both Codex (P1) and Claude (P2) flagged a deadlock: the claim used two writable CTEs (claim_self then claim_rest), locking the self row before siblings, so two survivors of the same batch pulled concurrently acquired row locks in opposite order and PostgreSQL aborted one with deadlock_detected (a transient pull error on exactly the two-survivors race this path handles). Replace with a single `UPDATE ... WHERE debounce_batch = (...) AND consumed_at IS NULL RETURNING id` that claims the whole batch: both transactions lock rows in the same scan order, so one simply waits and re-evaluates under EvalPlanQual. A `claimed_self` flag (EXISTS id = self in the claimed set) plus the `mine` snapshot still distinguishes fresh-claim / consumed-by-other / own-re-pull. Also assert add_survivor_to_batch_of actually inserts a row (rows_affected == 1) so a mis-set-up test can't pass vacuously. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Windmill Backend
This folder holds all backend components, the src/ folder only contains files used to build the "root" binary.
Components
| name | description |
|---|---|
| windmill-api | The API server, exposing functionality to other components and the frontend |
| windmill-audit | Contains audit functionality, allowing different components to record important actions |
| windmill-common | Common code shared by all crates |
| windmill-queue | Contains job & flow queuing functionality, commonly written to by the API server and read from by workers |
| windmill-worker | The worker. Used to process and execute flows & jobs. |
| parsers | Contains code to parse signatures in different langauges. |
Compile sqlx for offline ci
cargo sqlx prepare --workspace -- --bin windmill --features enterprise