Description
FileMap is not closeable
for it doesn't implement Closeable
. Thus the resource is not closed when executing closeStream
(either not in Metamorph nor in Metafix.)
As FileMap
extends AbstractReadOnlyMap
the latter should implement Closeable
, guaranteeing a treatment of calling close()
. Same is true for RdfMap.
This fixes Memory Leaks we discovered.
The leak appears when a Fix
is instantiated several times anew within the same JVM. New instantiations happen e.g. in https://github.com/hbz/rpb/ for every single ETLed document (some handfuls per day). It happens in https://github.com/hbz/lobid-resources/ every time its webhook listener is called (regularly once per day). It happens also in https://metafacture.org/playground/ when clicking dozen of time on process having a Fix loading a table.
Bug fix should be also made for the last java 1.8 version (metafacture-core 5.7.0 and metafacture-fix 0.7.0) since we rely partly on that version , e.g. in rpb.
We should also blog about the Memory Leak: experiencing, discovering, analyzing, fixing.
Metadata
Metadata
Assignees
Type
Projects
Status