gaborkaszab commented on PR #15954:
URL: https://github.com/apache/iceberg/pull/15954#issuecomment-4649678911

   Hey @manuzhang ,
   
   We discussed this with @singhpk234 and seems to be fine. The reason is that 
we use SessionContext.sessionId() as part of the key in the cache. As per how 
this session ID is defined see in `SessionCatalog.SessionContect`:
   
   ```/**
        * Returns a string that identifies this session.
        *
        * <p>This can be used for caching state within a session.
        *
        * @return a string that identifies this session
        */
       public String sessionId() {
         return sessionId;
       }
   ```
   
   Key is: `This can be used for caching state within a session`. In other 
words, if the creds change for instance ,then it's not the same session, you 
have to give a new session ID. When it comes to reading from cache, when you 
read with your new session ID, it won't give you the entry with the old 
credentials/context.
   
   So far the only affected engine we know about is Trino. I already reached 
out to @ebyhr to do some adjustments on their side to have a new session ID 
whenever the context changes.
   
   I think we are fine here. Let me know if I miss anything here. If there is 
nothing else, we can close this IMO.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to