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

   > I don't think you can simply move the `RemoveExpiredEntriesNoMutex` logic 
into `RemoveExpiredEntriesFromCache`, as the mutex is also needed to handle 
updating `last_cache_cleanup_timestamp_` in `CheckCacheForExpiredTokens` and 
prevent repeated clean ups. And `std::mutex` is non-recursive so you can't call 
`RemoveExpiredEntriesFromCache` while already holding a lock.
   
   I got it. Does last_cache_cleanup_timestamp_ need to be updated within 
```RemoveExpiredEntriesFromCache``` or the timestamp is solely for 
```CheckCacheForExpiredTokens```? If it did, 
```RemoveExpiredEntriesFromCache``` would literally be 
CheckCacheForExpiredTokens(0.0). 


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