Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash changes for the same transaction #38

Closed
kordano opened this issue Apr 25, 2019 · 1 comment
Closed

hash changes for the same transaction #38

kordano opened this issue Apr 25, 2019 · 1 comment
Labels
bug Something isn't working
Projects

Comments

@kordano
Copy link
Member

kordano commented Apr 25, 2019

The same transaction on a db value results in different hash values:

(:require '[datahike.core :as d])

(def db (d/db-with (d/empty-db) [{:db/id 1 :name "Konrad"}]))
(hash (d/db-with db [[:db.fn/retractEntity 1]]))
;; => 32706373
(hash (d/db-with db [[:db.fn/retractEntity 1]]))
;; => 13589158
@kordano kordano added the bug Something isn't working label Apr 25, 2019
@kordano kordano added this to To do in Development via automation Apr 25, 2019
@whilo
Copy link
Member

whilo commented May 4, 2019

The hitchhiker-tree has mutable helper objects attached to tree nodes, maybe its hashes break equality. One way to fix this would be to implement hashing on tree nodes explicitly.

@kordano kordano closed this as completed Jul 23, 2019
Development automation moved this from To do to Done Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development
  
Done
Development

No branches or pull requests

2 participants