XN137 commented on code in PR #2972:
URL: https://github.com/apache/polaris/pull/2972#discussion_r2494226538


##########
runtime/service/src/main/java/org/apache/polaris/service/context/catalog/PolarisCallContextCatalogFactory.java:
##########
@@ -39,7 +39,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@ApplicationScoped
+@RequestScoped

Review Comment:
   i thought we generally wanted to avoid injecting request-scoped beans into 
application-scoped beans...
   so whats the guiding principle when something should be application or 
request scoped then for you?
   
   i thought since the `PolarisPrincipal` is being derived from 
`SecurityContext` and is now a ctor parameter, we should mark this class as 
request-scoped, to make clear this factory is only usable while handling a 
request.
   and as stated in the PR description afaict the factory is only ever injected 
into `IcebergCatalogAdapter` which is marked as request-scoped already.



-- 
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]

Reply via email to