Commit 4717232
authored
fix(cfg): avoid dual-connection WAL conflict in native bulkInsertCfg (#719)
* fix(cfg): move delete-before-insert into native bulkInsertCfg to avoid WAL conflict
The native bulk insert path called deleteCfgForNode via the JS
better-sqlite3 connection, then suspended the JS DB and inserted via
the native rusqlite connection. This dual-connection pattern caused a
WAL conflict that left cfg_blocks empty after builds.
Move the DELETE statements into the Rust bulk_insert_cfg function so
all operations happen on a single (native) connection within one
transaction. The JS side now sends entries with empty blocks/edges for
nodes that need deletion only.
* fix(cfg): disable native bulk CFG path to avoid dual-connection WAL conflict
The v3.6.0 native binary introduced bulkInsertCfg, but the CFG path
requires delete-before-insert where deletes go through JS (better-sqlite3)
and inserts through native (rusqlite), creating a WAL conflict that
silently drops all CFG data. Disable the native bulk path so the proven
JS-only persistNativeFileCfg handles both operations on a single connection.
The Rust-side fix (previous commit) will allow re-enabling the native path
once the next binary is published with delete logic inside bulkInsertCfg.
* fix(cfg): prefix unused engineOpts param with underscore
* fix: propagate CFG delete errors instead of silently swallowing (#719)1 parent abe4b46 commit 4717232
2 files changed
Lines changed: 23 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
861 | 870 | | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
862 | 879 | | |
863 | 880 | | |
864 | 881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
432 | 387 | | |
433 | 388 | | |
434 | 389 | | |
| |||
0 commit comments