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