Commit c969f50
committed
fix(run-engine): waitpoint update misleading error logs
The `completeWaitpoint` method ignores Prisma update errors of type `P2025` to
handle concurrent attempts to complete a waitpoint token. We have an
error hook on the Prisma client which logs these errors though.
This PR switches to `updateMany` which doesn't throw an error if the
waitpoint is in an unexpected state. The behavior remains otherwise
unchanged. We currently continue even if the waitpoint is not in `PENDING`,
which could lead to race conditions in certain corner cases, though very
unlikely. We added a log line to see how often concurrent completion
attempts happen.1 parent 05b6a26 commit c969f50
File tree
1 file changed
+19
-16
lines changed- internal-packages/run-engine/src/engine/systems
1 file changed
+19
-16
lines changedLines changed: 19 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
| 82 | + | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
107 | 98 | | |
108 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | | - | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | | - | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
0 commit comments