Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/19181 )
Change subject: IMPALA-11470: Add Cache For Codegen Functions ...................................................................... Patch Set 9: (1 comment) http://gerrit.cloudera.org:8080/#/c/19181/9/be/src/codegen/llvm-codegen-cache.cc File be/src/codegen/llvm-codegen-cache.cc: http://gerrit.cloudera.org:8080/#/c/19181/9/be/src/codegen/llvm-codegen-cache.cc@185 PS9, Line 185: // Because the Cache::Insert() requires the caller to avoid multiple handles for : // the same key to inser > The two caches we linked are a bit different - when implementing LIRS evict Sorry, my comment was vague. My intention was more "don't be a bad client" rather than "the cache can't handle this". It is ok to have multiple different threads calling Lookup() on the same entry. The main thing is that Lookup() returns a handle and that handle will keep the entry from being evicted. We don't want callers holding the handle for extended periods of time or losing track or whatnot. I think it is also ok to have multiple different threads calling Insert() for the same entry. I believe we keep the entry from the last call to Insert(). That said, multiple inserts for the same entry can be inefficient, because we are evicting entries in anticipation of the new entry. -- To view, visit http://gerrit.cloudera.org:8080/19181 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If42c78a7f51fd582e5fe331fead494dadf544eb1 Gerrit-Change-Number: 19181 Gerrit-PatchSet: 9 Gerrit-Owner: Yida Wu <wydbaggio...@gmail.com> Gerrit-Reviewer: Abhishek Rawat <ara...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Qifan Chen <qfc...@hotmail.com> Gerrit-Reviewer: Yida Wu <wydbaggio...@gmail.com> Gerrit-Comment-Date: Wed, 23 Nov 2022 17:55:17 +0000 Gerrit-HasComments: Yes