You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/06/19 00:07:37 UTC
[GitHub] [spark] HyukjinKwon commented on a diff in pull request #40982: [SPARK-43300][CORE] NonFateSharingCache wrapper for Guava Cache
HyukjinKwon commented on code in PR #40982:
URL: https://github.com/apache/spark/pull/40982#discussion_r1233412076
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala:
##########
@@ -1576,8 +1576,12 @@ object CodeGenerator extends Logging {
* they are explicitly removed. A Cache on the other hand is generally configured to evict entries
* automatically, in order to constrain its memory footprint. Note that this cache does not use
* weak keys/values and thus does not respond to memory pressure.
+ *
+ * Codegen can be slow. Use a non fate sharing cache in case a query gets canceled during codegen
+ * while other queries wait on the same code, so that those other queries don't get wrongly
+ * aborted. See [[NonFateSharingCache]] for more details.
*/
- private val cache = CacheBuilder.newBuilder()
+ private val cache = NonFateSharingCache(CacheBuilder.newBuilder()
Review Comment:
In that case, I guess we should either move this to core module, or `NonFateSharingCache` to catalyst module?
Do you have other better ideas, @LuciferYang ?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org