From 861634b98659f21c5070c7507d6670a16626ed0a Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 29 Oct 2026 15:33:27 +0000 Subject: [PATCH] :recycle: Bind the snapshot loader through the fdata helper `reduce-snapshots` hand-rolled the same `binding` that `fdata/with-pointers` builds (it also loaded the function's own pointer loader before entering the reduction). Use the macro so the rule holds there too and the namespace no longer needs `app.util.pointer-map`; the loader is identical (same cfg and file-id) and snapshot walking behaves the same. AI-assisted-by: deepseek-v4.1-flash --- backend/src/app/features/file_snapshots.clj | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/src/app/features/file_snapshots.clj b/backend/src/app/features/file_snapshots.clj index ff93eef02b..e9d8429d63 100644 --- a/backend/src/app/features/file_snapshots.clj +++ b/backend/src/app/features/file_snapshots.clj @@ -22,7 +22,6 @@ [app.jobs :as jobs] [app.storage :as sto] [app.util.blob :as blob] - [app.util.pointer-map :as pmap] [cuerdas.core :as str])) (def sql:snapshots @@ -455,12 +454,11 @@ pointer ids never trigger a load." [cfg file-id xform f init] (let [conn (db/get-connection cfg) - load (partial fdata/load-pointer cfg file-id) xform (comp (map (partial fdata/resolve-file-data cfg)) (map (partial fdata/decode-file-data cfg)) xform)] - (binding [pmap/*load-fn* load] + (fdata/with-pointers cfg file-id (->> (db/plan conn [sql:get-snapshots file-id] {:fetch-size 1}) (transduce xform f init)))))