You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/29 11:58:42 UTC

[GitHub] [iceberg] szlta commented on issue #5371: Hive: Concurrency Issue for CachedClientPool

szlta commented on issue #5371:
URL: https://github.com/apache/iceberg/issues/5371#issuecomment-1199193920

   Hi @szehon-ho, in your example above shouldn't Thread B's get() call reset the counter in the cache?
   And if so, then Caffeine should not invoke the removalListener as the object was not removed, so serving the same client pool object should work for Thread B (for another x time duration, 5 mins default AFAIK)
   
   Similarly, if the pool object did time out since the last access (done by Thread A), then Caffeine should remove that object, and serve Thread B a fresh one (and in the meantime it may very well call the removalListener on the old one simultaneously, that's fine as Thread B won't have a reference to that)
   
   To me it seems like that the scenario that you describe could only go sideways if Caffeine itself is not thread safe with handing out / expiring objects within. Am I missing something?


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org