ensure db persistent

This commit is contained in:
Tienson Qin
2025-04-21 00:30:34 +08:00
parent 6fc010f844
commit 59a0c0c585
2 changed files with 2 additions and 5 deletions

View File

@@ -228,7 +228,6 @@
(keep (fn [b] (d/entity (:db-after refs-tx-report) (:db/id b))) blocks)
blocks)
block-path-refs-tx (distinct (compute-block-path-refs-tx tx-report blocks'))
path-refs-tx-report (when (seq block-path-refs-tx)
(ldb/transact! conn block-path-refs-tx {:pipeline-replace? true}))]
path-refs-tx-report (ldb/transact! conn block-path-refs-tx {:pipeline-replace? true})]
{:refs-tx-report refs-tx-report
:path-refs-tx-export path-refs-tx-report}))

View File

@@ -285,9 +285,7 @@
(or from-disk? new-graph?)
(let [{:keys [blocks]} (ds-report/get-blocks-and-pages tx-report)
path-refs (distinct (compute-block-path-refs-tx tx-report blocks))
tx-report' (if (seq path-refs)
(ldb/transact! conn path-refs {:pipeline-replace? true})
tx-report)
tx-report' (ldb/transact! conn path-refs {:pipeline-replace? true})
full-tx-data (concat (:tx-data tx-report) (:tx-data tx-report'))
final-tx-report (assoc tx-report'
:tx-meta (:tx-meta tx-report)