linliu-code commented on issue #20104:
URL: https://github.com/apache/hudi/issues/20104#issuecomment-5860900113

   Confirming one of the open questions from the description: `CLEAR CACHE` 
does reclaim the stranded entries, `UNCACHE TABLE` does not.
   
   Measured on an unmodified build, three cache/write cycles on one table:
   
       entries after 3 cycles     = 3
       entries after UNCACHE TABLE = 3
       entries after CLEAR CACHE   = 0
   
   The two differ for the same reason the bug exists: `UNCACHE TABLE` resolves 
the table to a plan and looks the entry up by it, which is exactly the lookup 
that fails, whereas `CLEAR CACHE` drops everything unconditionally without 
consulting a plan.
   
   So there is an escape hatch today, but a blunt one - `CLEAR CACHE` is 
session-wide, so on a shared SQL server it discards every cached table for 
every connected user, not just the leaked entries.


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