Commit ba4beb6
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 7ca070b commit ba4beb6
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 | |
|---|---|---|---|
| |||
2209 | 2209 | | |
2210 | 2210 | | |
2211 | 2211 | | |
2212 | | - | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
2213 | 2218 | | |
2214 | 2219 | | |
2215 | 2220 | | |
| |||
2419 | 2424 | | |
2420 | 2425 | | |
2421 | 2426 | | |
2422 | | - | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
2423 | 2433 | | |
2424 | 2434 | | |
2425 | 2435 | | |
| |||
2453 | 2463 | | |
2454 | 2464 | | |
2455 | 2465 | | |
2456 | | - | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2457 | 2472 | | |
2458 | 2473 | | |
2459 | 2474 | | |
| |||
2514 | 2529 | | |
2515 | 2530 | | |
2516 | 2531 | | |
2517 | | - | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
2518 | 2538 | | |
2519 | 2539 | | |
2520 | 2540 | | |
| |||
2714 | 2734 | | |
2715 | 2735 | | |
2716 | 2736 | | |
2717 | | - | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
2718 | 2743 | | |
2719 | 2744 | | |
2720 | 2745 | | |
| |||
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 | | |
| |||
1532 | 1533 | | |
1533 | 1534 | | |
1534 | 1535 | | |
1535 | | - | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
1536 | 1543 | | |
1537 | 1544 | | |
1538 | 1545 | | |
| |||
1668 | 1675 | | |
1669 | 1676 | | |
1670 | 1677 | | |
1671 | | - | |
| 1678 | + | |
| 1679 | + | |
1672 | 1680 | | |
1673 | 1681 | | |
1674 | 1682 | | |
| |||
1747 | 1755 | | |
1748 | 1756 | | |
1749 | 1757 | | |
1750 | | - | |
| 1758 | + | |
| 1759 | + | |
1751 | 1760 | | |
1752 | 1761 | | |
1753 | 1762 | | |
| |||
| 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