You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/06/27 05:53:11 UTC

[GitHub] [calcite] danny0405 commented on a change in pull request #1281: [CALCITE-3149] RelDataType CACHE in RelDataTypeFactoryImpl can't be garbage collected

danny0405 commented on a change in pull request #1281: [CALCITE-3149] RelDataType CACHE in RelDataTypeFactoryImpl can't be garbage collected
URL: https://github.com/apache/calcite/pull/1281#discussion_r298015873
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java
 ##########
 @@ -347,7 +350,7 @@ public RelDataType createTypeWithNullability(
    * @throws NullPointerException if type is null
    */
   protected RelDataType canonize(final RelDataType type) {
-    return CACHE.getUnchecked(type);
 
 Review comment:
   The Oracle doc says that an soft reference object will be garbage collected when it is "softly reachable":
   > Suppose that the garbage collector determines at a certain point in time that an object is softly reachable.
   
   So do you mean the guava CACHE with same soft reference k-v objects is not softly reachable ? Sorry i'm not that familiar with the Java garbage collection mechanism.
   
   [1] https://docs.oracle.com/javase/8/docs/api/java/lang/ref/SoftReference.html
   [2] https://docs.oracle.com/javase/8/docs/api/java/lang/ref/package-summary.html#reachability

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services