GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — fix(tables): handle row deletion during cell execution by TheodoreSpeaks · Pull Request #6520 · simstudioai/sim Conversation
Contributor
Summary
Type of Change
Testing
Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
PR SummaryMedium Risk Overview A new Unexpected write failures (e.g. database errors) still propagate; only missing-row cases are treated as benign. Reviewed by Cursor Bugbot for commit 7e728d0. Bugbot is set up for automated code reviews on this repo. Configure here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Greptile SummaryThe PR safely handles rows deleted while workflow or enrichment cells are executing.
Confidence Score: 5/5The PR appears safe to merge; the deletion race is handled without suppressing unrelated write failures. The parent-row lock closes the execution-status foreign-key race, while the typed error catch narrowly handles rows disappearing from data-write paths and preserves unexpected exceptions.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/table/cell-write.ts | Serializes status-only writes with row deletion and converts only typed deletion races into skipped writes. |
| apps/sim/lib/table/rows/service.ts | Replaces generic missing-row exceptions at both update race points with the dedicated error type. |
| apps/sim/lib/table/rows/errors.ts | Defines a focused error class used to distinguish expected row-deletion races. |
| apps/sim/lib/table/cell-write.test.ts | Covers deletion before pickup, deletion during mutation, locking, and fail-fast handling of unrelated errors. |
sequenceDiagram
participant Writer as Cell execution writer
participant Rows as userTableRows
participant Exec as tableRowExecutions
participant Delete as Concurrent row deletion
alt Data patch
Writer->>Rows: updateRow(...)
Rows-->>Writer: TableRowNotFoundError if deleted
Writer-->>Writer: Return skipped
else Status-only patch
Writer->>Rows: SELECT ... FOR KEY SHARE
alt Row exists
Writer->>Exec: writeExecutionsPatch(...)
Exec-->>Writer: Result
Writer->>Rows: Commit and release lock
Delete->>Rows: Delete row after lock release
else Row missing
Rows-->>Writer: No row
Writer-->>Writer: Return skipped
end
end
Reviews (1): Last reviewed commit: "fix(tables): handle row deletion during ..." | Re-trigger Greptile
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
7e728d0e
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.