ymolochkov opened a new pull request #8384: URL: https://github.com/apache/ignite/pull/8384
Since CHMs with cache descriptors are widely used, I think it's better to use hash of cache name instead of an actual name. My reasonings are: - hash is a one way function, therefore we can't revert hash to readable name, so having cacheId does nothing for us if we have CHM with cache names as keys; - hashing of String keys are done under the hood by CHM and then cached in string pool, so it incurs minimal overhead in terms of CHM algorithms, if any - since hashing is just a function to get a unique int for a string, so a hash of an int == that same int - all in all, we lose almost nothing in terms of performance, simultaneously we gain a lot when looking up values in a map, since it's complexity is constant time value - string and its hash are unique values (or they are ought to be anyway), so nothing changes in logic ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
