You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 26, 2023. It is now read-only.
During our internal performance testing we found out that there's a resource leak (which is causing abnormal native memory consumption) in com.google.api.gax.core.PropertiesProvider class. Test app with google datastore api consumed more than 20 GB of RAM and java process got killed by linux's OOM killer.
are loading resources but not closing them(input stream is not closed). So native resources are held using java.util.zip.Inflater (See java.util.zip.GZIPInputStream).
Another proposal is to cache results of property loading by key. Even dumb implementation with synchronization of entire method and HashMap(as cache provider) will work quicker than loading of resource each time.
Dear Google team,
During our internal performance testing we found out that there's a resource leak (which is causing abnormal native memory consumption) in com.google.api.gax.core.PropertiesProvider class. Test app with google datastore api consumed more than 20 GB of RAM and java process got killed by linux's OOM killer.
Methods
PropertiesProvider#loadProperty(Class<?> loadedClass, String propertiesPath, String key)and
PropertiesProvider#loadProperty(Properties properties, String propertiesPath, String key)are loading resources but not closing them(input stream is not closed). So native resources are held using java.util.zip.Inflater (See java.util.zip.GZIPInputStream).
Another proposal is to cache results of property loading by key. Even dumb implementation with synchronization of entire method and HashMap(as cache provider) will work quicker than loading of resource each time.
Tested on linux with latest JDK 8.
BR,
Dionis