replikativ / datahike-jdbc

Datahike JDBC data storage backend
Eclipse Public License 1.0
16 stars 4 forks source link

update store-identity to correctly determine equivalence of configs #26

Closed alekcz closed 10 months ago

alekcz commented 10 months ago

The store-identity is not correctly determining if configurations are equivalent. As a result two stores are functionally equivalent are not be deemed so unless they are literally equivalent. This fix uses the store-identity to check equivalence for configurations and connections. It also prevents defaults that may make stores different without the user's knowledge.

e.g. on JDBC these two stores are equivalent but not be deemed so. They appear different as because in one case the DB and datahike are on the same network and the in the other they are not.

(def pg-cfg  {:dbtype  "postgresql" :jdbcUrl "postgresql://user:password@localhost/konserve"}
(def pg-cfg  {:dbtype  "postgresql" :jdbcUrl "postgresql://user:password@myremoteaddress.com/konserve"})
TimoKramer commented 10 months ago

Thanks for this PR! I don't get too much of what the store-identity is for, so please review this @whilo