File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# WIP
22
33- Stable sorting of sequences of various types #470
4+ - Correctly restore ` :max-tx ` from storage
45
56# 1.6.5 - May 3, 2024
67
Original file line number Diff line number Diff line change 152152(defn db-with-tail [db tail]
153153 (reduce
154154 (fn [db datoms]
155- (reduce db/with-datom db datoms))
155+ (if (empty? datoms)
156+ db
157+ (as-> db %
158+ (reduce db/with-datom % datoms)
159+ (assoc % :max-tx (:tx (first datoms))))))
156160 db tail))
157161
158162(defn restore
Original file line number Diff line number Diff line change 272272 ; ; restore conn with tail
273273 (let [conn' (d/restore-conn storage)]
274274 (is (= @conn @conn'))
275+ (is (= (:max-eid @conn) (:max-eid @conn')))
276+ (is (= (:max-tx @conn) (:max-tx @conn')))
275277
276278 ; ; transact keeps working on restored conn
277279 (d/transact! conn' [[:db/add 35 :name " Vera" ]])
You can’t perform that action at this time.
0 commit comments