fix: large graph download OOM

This commit is contained in:
Tienson Qin
2026-01-28 11:58:54 +08:00
parent 303c8b19c3
commit 1b4ad6a416
4 changed files with 62 additions and 86 deletions

View File

@@ -270,10 +270,8 @@
total' (+ total (count rows))
total-rows' (into total-rows rows)]
(when (seq total-rows')
(p/do!
(state/<invoke-db-worker :thread-api/db-sync-import-kvs-rows
graph total-rows' true graph-uuid)
(state/<invoke-db-worker :thread-api/db-sync-finalize-kvs-import graph remote-tx)))
(state/<invoke-db-worker :thread-api/db-sync-import-kvs-rows
graph total-rows' true graph-uuid remote-tx))
total')
(let [value (.-value chunk)
{:keys [rows buffer]} (parse-framed-chunk buffer value)