kapoisu commented on issue #46217:
URL: https://github.com/apache/arrow/issues/46217#issuecomment-2833759125

   @adamreeve I want to confirm it again. The two-level cache object itself 
already contains a timestamp that is independent of the expiration time per 
key. And this timestamp cannot be used to handle the situations you mentioned 
so that an additional timestamp within the KeyToolkit is necessary?
   
   Btw I've found another potential fix.
   
https://github.com/apache/arrow/blob/6e84d990379a0fe20a0a89311aa864f40efded23/cpp/src/parquet/encryption/two_level_cache_with_expiration.h#L98C3-L111C21
   The insert() does nothing when the key exists. This should be either:
   1. Remove the isExpired() check.
   2. Update the expiration timestamp when the key is expired.
   
   RemoveExpiredEntriesNoMutex() also seems duplicate. It's currently used by 
CheckCacheForExpiredTokens only and the mutex is acquired anyway.


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to