Closed alekcz closed 9 months ago
@whilo @TimoKramer thoughts?
I think disabling might not be the best idea. The problem is once you connect to a store with a potentially incompatible configuration you might corrupt the database. I agree that the jdbcUrl
should be allowed to be different for the hostname and port. Maybe we could provide a multimethod that is implemented by every store and only returns the part of the config that should be matched.
store-identity
is supposed to do that, I need to check again how it works for JDBC. Alternatively we could still use the random names and add them to every store and just rely on that.
Lemme work on making store-identity more robust.
@whilo I've almost completed the store-identity
work on datahike-jdbc
. The missing part in on the datahike side. The comparison doesn't use the store-identity
: https://github.com/replikativ/datahike/blob/166cdbbb7031fa03e619091fb7a99c20cd550ec3/src/datahike/connector.cljc#L126C18-L126C18
Right, I think it should break out the store config there and run store-identity on it and then equality check that.
Resolved by #655
Describe the feature you would like to request
The
ensure-stored-config-consistency
function that validates connection creates issues when a valid connection may different names.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.
A tangentially related question: with the
ensure-stored-config-consistency
how would one go about updating the cache size?Describe the solution you would like
Describe alternatives you've considered
None really. I'm not familiar enough with Datahike to work on the internal code.