datahike

2026-02-13T21:54:00.214079Z

Looks like a bug with Postgres as backend in tiered storage on deleting branch: 2026-02-13T21:37:11.946Z b8195648be6a WARN [konserve.tiered:225] - Async backend update failed in write-behind {:key [:branches] ... Full stacktrace in thread It tries to disj from list?

whilo 2026-02-14T20:32:48.158569Z

Taking a look.

whilo 2026-02-14T21:04:08.120089Z

I would apply this fix right now, still not clear why it turned into a list https://github.com/replikativ/datahike/pull/778/changes; do you think this will work for you?

whilo 2026-02-14T21:12:10.662469Z

Lmk, then I will merge it and push a release.

🔥 1
2026-02-14T21:28:17.087639Z

Yes, it will work. Thank you. But there was no need to create set for conj operations... only for consistency maybe

whilo 2026-02-14T21:36:59.855989Z

I want it to be a set in general, this will ensure that.

👍 1
whilo 2026-02-14T22:45:08.051359Z

Should be fixed with 0.7.1647

👍 1
2026-02-14T23:42:53.885269Z

Yeah, it works

whilo 2026-02-14T23:43:13.297649Z

Perfect; How many branches are you operating with?

2026-02-14T23:44:02.227999Z

Now just several. I will tell you later when we start use it actively

👍 1
2026-02-13T21:54:12.393939Z

Feb 13 21:37:11 nixos laniakea-stars-bot[27570]: 2026-02-13T21:37:11.946Z b8195648be6a WARN [konserve.tiered:225] - Async backend update failed in write-behind {:key [:branches], :error #error {
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:  :cause "class clojure.lang.PersistentList cannot be cast to class clojure.lang.IPersistentSet (clojure.lang.PersistentList and clojure.lang.IPersistentSet are in unnamed module of loader 'app')"
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:  :via
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:  [{:type java.lang.ClassCastException
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:    :message "class clojure.lang.PersistentList cannot be cast to class clojure.lang.IPersistentSet (clojure.lang.PersistentList and clojure.lang.IPersistentSet are in unnamed module of loader 'app')"
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:    :at [clojure.core$disj invokeStatic "core.clj" 1540]}]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:  :trace
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:  [[clojure.core$disj invokeStatic "core.clj" 1540]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [clojure.core$disj invoke "core.clj" 1533]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [datahike.experimental.versioning$delete_branch_BANG_$fn__69107 invoke "versioning.cljc" 84]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.impl.defaults$update_blob invokeStatic "defaults.cljc" 83]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.impl.defaults$update_blob invoke "defaults.cljc" 56]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.impl.defaults$io_operation$fn__38784 invoke "defaults.cljc" 274]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.impl.defaults$io_operation invokeStatic "defaults.cljc" 264]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.impl.defaults$io_operation invoke "defaults.cljc" 244]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.impl.defaults.DefaultStore _update_in "defaults.cljc" 470]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.tiered.TieredStore$fn__28197$state_machine__17664__auto____28232$fn__28234$fn__28236 invoke "tiered.cljc" 223]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.tiered.TieredStore$fn__28197$state_machine__17664__auto____28232$fn__28234 invoke "tiered.cljc" 222]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.tiered.TieredStore$fn__28197$state_machine__17664__auto____28232 invoke "tiered.cljc" 222]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [clojure.core.async.impl.ioc_macros$run_state_machine invokeStatic "ioc_macros.clj" 58]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [clojure.core.async.impl.ioc_macros$run_state_machine invoke "ioc_macros.clj" 57]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invokeStatic "ioc_macros.clj" 62]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invoke "ioc_macros.clj" 60]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [konserve.tiered.TieredStore$fn__28197 invoke "tiered.cljc" 222]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [clojure.lang.AFn run "AFn.java" 22]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [java.util.concurrent.ThreadPoolExecutor runWorker nil -1]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [java.util.concurrent.ThreadPoolExecutor$Worker run nil -1]
Feb 13 21:37:11 nixos laniakea-stars-bot[27570]:   [java.lang.Thread run nil -1]]}}

2026-02-13T21:58:39.576999Z

Like I see in code, delete-branch! doing only releasing connection and removing branch from set of known branches. It is not critical not to delete branches? (i would have really many, one branch per request to app)

whilo 2026-02-14T20:48:15.143849Z

If you want storage to be reclaimed you will have to run gc btw. Branch deletion does not remove all its data (yet).

2026-02-14T20:50:52.746229Z

So... if I am not concerned (for now) about the storage, then I can just release connection (i am concerned about stale resources) ?

whilo 2026-02-14T20:51:29.546549Z

You can release the connection and if the branch is removed and you run gc it should free the storage.

whilo 2026-02-14T20:51:57.549299Z

So delete-branch! is still needed.

2026-02-14T20:52:59.367909Z

I understand