diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.edn index 0861c0988f..bff142efde 100644 --- a/.clj-kondo/config.edn +++ b/.clj-kondo/config.edn @@ -128,9 +128,13 @@ frontend.worker.handler.page.rename worker-page-rename frontend.worker.handler.file.util wfu lambdaisland.glogi log - logseq.common.path path - logseq.common.graph common-graph logseq.common.config common-config + logseq.common.graph common-graph + logseq.common.date-time-util date-time-util + logseq.common.path path + logseq.common.util common-util + logseq.common.util.page-ref page-ref + logseq.common.util.block-ref block-ref logseq.db ldb logseq.db.frontend.property db-property logseq.db.frontend.property.type db-property-type @@ -143,12 +147,8 @@ logseq.graph-parser.text text logseq.graph-parser.block gp-block logseq.graph-parser.mldoc gp-mldoc - logseq.common.util common-util logseq.graph-parser.property gp-property - logseq.common.util.page-ref page-ref - logseq.common.util.block-ref block-ref logseq.graph-parser.util.db db-util - logseq.graph-parser.date-time-util date-time-util logseq.outliner.core outliner-core logseq.outliner.pipeline outliner-pipeline logseq.outliner.datascript-report ds-report diff --git a/deps/db/test/logseq/db/sqlite/db_test.cljs b/deps/db/test/logseq/db/sqlite/common_db_test.cljs similarity index 95% rename from deps/db/test/logseq/db/sqlite/db_test.cljs rename to deps/db/test/logseq/db/sqlite/common_db_test.cljs index 8cd8e78588..f1b43805e6 100644 --- a/deps/db/test/logseq/db/sqlite/db_test.cljs +++ b/deps/db/test/logseq/db/sqlite/common_db_test.cljs @@ -1,4 +1,4 @@ -(ns logseq.db.sqlite.db-test +(ns logseq.db.sqlite.common-db-test (:require [cljs.test :refer [deftest async use-fixtures is testing]] ["fs" :as fs] ["path" :as node-path] @@ -27,8 +27,7 @@ (create-graph-dir "tmp/graphs" "test-db") (let [conn* (sqlite-db/open-db! "tmp/graphs" "test-db") - blocks [{:block/uuid (random-uuid) - :file/path "logseq/config.edn" + blocks [{:file/path "logseq/config.edn" :file/content "{:foo :bar}"}] _ (d/transact! conn* blocks) ;; Simulate getting data from sqlite and restoring it for frontend diff --git a/scripts/src/logseq/tasks/db_graph/create_graph_with_large_sizes.cljs b/scripts/src/logseq/tasks/db_graph/create_graph_with_large_sizes.cljs index fc425c2fc3..cf72034e94 100644 --- a/scripts/src/logseq/tasks/db_graph/create_graph_with_large_sizes.cljs +++ b/scripts/src/logseq/tasks/db_graph/create_graph_with_large_sizes.cljs @@ -68,8 +68,8 @@ blocks-tx (create-graph/create-blocks-tx (create-init-data options))] (println "Built" (count blocks-tx) "tx," (count (filter :block/name blocks-tx)) "pages and" (count (filter :block/content blocks-tx)) "blocks ...") - ;; Vary the chunking with page size for now - (let [tx-chunks (partition-all (:pages options) blocks-tx)] + ;; Vary the chunking with page size up to a max to avoid OOM + (let [tx-chunks (partition-all (min (:pages options) 30000) blocks-tx)] (loop [chunks tx-chunks chunk-num 1] (when-let [chunk (first chunks)]