8000 Memory leak through missing Closeable · Issue #666 · metafacture/metafacture-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Memory leak through missing Closeable #666
Closed
hbz/rpb
#134
@dr0i

Description

@dr0i

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

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0