dennishuo commented on issue #761: URL: https://github.com/apache/polaris/issues/761#issuecomment-2791048460
> @dennishuo in the [EntityCache, L170](https://github.com/apache/polaris/blob/main/polaris-core/src/main/java/org/apache/polaris/core/persistence/cache/EntityCache.java#L170), there is an if conditional that suggests that the name of an entity can change without its entity version or grant records version being incremented. That sounds counter-intuitive and gets in the way of the rewrite. Can you help clarify this please? Is this case really possible? I believe this logic was intended to directly address the decoherence between byName and byId, based on the comment here: https://github.com/apache/polaris/blob/c39c2632599956d2a3a0224a9be9e228b161f380/polaris-core/src/main/java/org/apache/polaris/core/persistence/cache/EntityCache.java#L265 // the caller's fetched entity may have come from a stale lookup byName; we should consider // the existingCacheEntry to be the older of the two for purposes of invalidation to make // sure when we replaceCacheEntry we're also removing the old name if it's no longer valid In general, a name cannot change without entityVersion changing though. So if we're implementing with strict coherence, we can indeed assume that entityVersion changing will detect any name changes. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
