DaveDeCaprio commented on a change in pull request #24028: [SPARK-26917][SQL] 
Further reduce locks in CacheManager
URL: https://github.com/apache/spark/pull/24028#discussion_r264707498
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala
 ##########
 @@ -47,7 +46,7 @@ case class CachedData(plan: LogicalPlan, 
cachedRepresentation: InMemoryRelation)
 class CacheManager extends Logging {
 
   @transient
-  private val cachedData = new java.util.LinkedList[CachedData]
+  private var cachedData = IndexedSeq[CachedData]()
 
 Review comment:
   Yes, I read through this and we either need to use the read locks or use 
@volatile here.  I am not an expert on the details here but @volatile seems 
like a better solution.  I think ultimately the differences are negligible.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to