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?
Taking a look.
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?
Lmk, then I will merge it and push a release.
Yes, it will work. Thank you. But there was no need to create set for conj operations... only for consistency maybe
I want it to be a set in general, this will ensure that.
Should be fixed with 0.7.1647
Yeah, it works
Perfect; How many branches are you operating with?
Now just several. I will tell you later when we start use it actively
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]]}}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)
If you want storage to be reclaimed you will have to run gc btw. Branch deletion does not remove all its data (yet).
So... if I am not concerned (for now) about the storage, then I can just release connection (i am concerned about stale resources) ?
You can release the connection and if the branch is removed and you run gc it should free the storage.
So delete-branch! is still needed.
I understand