Commit fca76b0
committed
fix(tables): revalidate sync imports under the advisory lock, explain every blocked key
- The sync append/replace paths asserted only the request-start snapshot, so a
lock committed while the CSV was parsed still let the write through. Both now
re-read under the schema advisory lock at the top of their own transaction,
taken before acquireRowOrderLock so the order stays advisory -> rows_pos ->
definitions
- Delete/Backspace, Cmd+D, typeahead and cut raised no notice on an
update-locked table; they now explain the lock, and stay silent for users
without write access
- The multipart import fetch threw a plain Error, dropping the 423 status, so
the lock self-heal never ran and the stale detail cache survived. It throws
ApiClientError now and both import-into-table hooks call
handleTableLockRejection
- Force append at submit when the delete lock landed while the dialog was open
with Replace already selected1 parent 1aa9424 commit fca76b0
4 files changed
Lines changed: 76 additions & 16 deletions
File tree
- apps/sim
- app/workspace/[workspaceId]/tables
- [tableId]/components/table-grid
- components/import-csv-dialog
- hooks/queries
- lib/table
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2269 | 2269 | | |
2270 | 2270 | | |
2271 | 2271 | | |
2272 | | - | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
2273 | 2278 | | |
2274 | 2279 | | |
2275 | 2280 | | |
| |||
2479 | 2484 | | |
2480 | 2485 | | |
2481 | 2486 | | |
2482 | | - | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
2483 | 2493 | | |
2484 | 2494 | | |
2485 | 2495 | | |
| |||
2513 | 2523 | | |
2514 | 2524 | | |
2515 | 2525 | | |
2516 | | - | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
2517 | 2532 | | |
2518 | 2533 | | |
2519 | 2534 | | |
| |||
2574 | 2589 | | |
2575 | 2590 | | |
2576 | 2591 | | |
2577 | | - | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
2578 | 2598 | | |
2579 | 2599 | | |
2580 | 2600 | | |
| |||
2777 | 2797 | | |
2778 | 2798 | | |
2779 | 2799 | | |
2780 | | - | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
2781 | 2806 | | |
2782 | 2807 | | |
2783 | 2808 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
| |||
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
337 | | - | |
| 340 | + | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
| |||
365 | 368 | | |
366 | 369 | | |
367 | 370 | | |
368 | | - | |
| 371 | + | |
369 | 372 | | |
370 | 373 | | |
371 | 374 | | |
372 | 375 | | |
373 | | - | |
| 376 | + | |
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
1578 | 1579 | | |
1579 | 1580 | | |
1580 | 1581 | | |
1581 | | - | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
1582 | 1589 | | |
1583 | 1590 | | |
1584 | 1591 | | |
| |||
1714 | 1721 | | |
1715 | 1722 | | |
1716 | 1723 | | |
1717 | | - | |
| 1724 | + | |
| 1725 | + | |
1718 | 1726 | | |
1719 | 1727 | | |
1720 | 1728 | | |
| |||
1793 | 1801 | | |
1794 | 1802 | | |
1795 | 1803 | | |
1796 | | - | |
| 1804 | + | |
| 1805 | + | |
1797 | 1806 | | |
1798 | 1807 | | |
1799 | 1808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
190 | 213 | | |
191 | 214 | | |
192 | 215 | | |
| |||
206 | 229 | | |
207 | 230 | | |
208 | 231 | | |
209 | | - | |
| 232 | + | |
210 | 233 | | |
211 | 234 | | |
212 | 235 | | |
213 | 236 | | |
214 | 237 | | |
215 | 238 | | |
216 | 239 | | |
217 | | - | |
| 240 | + | |
218 | 241 | | |
219 | 242 | | |
220 | 243 | | |
| |||
264 | 287 | | |
265 | 288 | | |
266 | 289 | | |
267 | | - | |
| 290 | + | |
268 | 291 | | |
269 | 292 | | |
270 | | - | |
| 293 | + | |
271 | 294 | | |
272 | 295 | | |
273 | 296 | | |
| |||
0 commit comments