File Handle leak in RegionFileCache (MCP)
File handles can leak if the soft references in RegionFileCache(MCP) are garbage collected. This can lead to a slow decrease in performance and ultimately IO problems because file handles run out.
https://github.com/cpw/FML/commit/6edce8b5f4d522f58421da4e00735cb6493103e6
I fixed it by removing the soft reference. The other approach is to apply a finalizer, but that's considered bad form. Better to always control this manually.
FYI the leak is the RandomAccessFile inside the RegionFile itself- note that there is no "finalizer cleanup" on RandomAccessFile.
2012-11-01, 03:32 PM
2013-02-19, 11:09 PM
2013-02-19, 11:09 PM
3
2