Printable idea sheet
batched_document_upsert
reqlan rq/indexer/cache-reuse.rq:258
Katz 0.049
Persist N extracted documents in one SQLite transaction ( `BEGIN` … `COMMIT` ).
Each document still replaces its ideas and edges the same way as a single-file upsert.
Soft sync may call this after extract so many changed files share one commit.
Empty code files may write nothing; batching helps when many files do persist.
On error or cancel of the batch write: fail the whole batch and roll back.
Do not commit a successful prefix. Same atomicity as multi-document delete.
Single-file upsert stays for watcher incremental ( watcher_incremental ).
Related: index_cache_reuse, soft_sync, documents_table,
nonblocking_index.
- implementation
- queries.rs, store.rs
- status
- done
- tests
- batch_upsert.rs:persist_extracted_batch_commits_multiple_documents, batch_upsert.rs:persist_extracted_batch_empty_is_noop, batch_upsert.rs:upsert_documents_rolls_back_entire_batch_on_error
Interactive page: batched_document_upsert