XN137 commented on PR #2290: URL: https://github.com/apache/polaris/pull/2290#issuecomment-3195517021
> Both loadEntitiesByName and loadEntitiesById seem like they solve the N+1 problem and also avoid trying to serialize lambdas over the wire. we could use those but we still would be running 2 queries instead of 1 i.e. for getting all principals. note that implementations of `PolarisMetaStoreManager.loadEntities` are free to use whatever mechanism they think is right, i.e. they can continue to use the current anti-pattern or use `listEntities` + `loadEntitiesById` ... the important bit is that we can present a uniform view to the callers (of which there are many). yet while `BasePersistence.loadEntities` exists, this seems to be most natural/efficient implementation for `PolarisMetaStoreManager.loadEntities`. -- 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: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org