You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/18 08:25:52 UTC

[GitHub] [flink] lirui-apache commented on issue #10620: [FLINK-15239][table-planner-blink] TM Metaspace memory leak

lirui-apache commented on issue #10620: [FLINK-15239][table-planner-blink] TM Metaspace memory leak
URL: https://github.com/apache/flink/pull/10620#issuecomment-566928696
 
 
   I changed the key and value type of this cache because guava will use identity comparison to determine equality of keys, according to the JavaDoc:
   ```
     /**
      * Specifies that each key (not value) stored in the cache should be wrapped in a {@link
      * WeakReference} (by default, strong references are used).
      *
      * <p><b>Warning:</b> when this method is used, the resulting cache will use identity ({@code ==})
      * comparison to determine equality of keys.
      *
      * <p>Entries with keys that have been garbage collected may be counted in {@link Cache#size},
      * but will never be visible to read or write operations; such entries are cleaned up as part of
      * the routine maintenance described in the class javadoc.
      *
      * @throws IllegalStateException if the key strength was already set
      */
     @GwtIncompatible("java.lang.ref.WeakReference")
     public CacheBuilder<K, V> weakKeys() {
       return setKeyStrength(Strength.WEAK);
     }
   ```

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