Thanks for the helpful QA session. This question was not fully addressed in the QA session and wanted to discuss it here further.
Original question:
Hi all! Is there a plan to discard temporary files created by the R nodes to contain workspaces? These files keep the workspace in the output port (RPortObject) and are not deleted until KNIME is closed. I am worried with big R models running on a server that is not restarted for days. Thanks!
I think the answer from Tobias was that the temporary workspace file was to be deleted when resetting the node and if not it is a bug. So I went to the RSnippetNodeModel at knime-r/org.knime.r/src/org/knime/r/RSnippetNodeModel.java at 50cb073a37cdc909d2e0d68d76a8ae0060ab90dd · knime/knime-r · GitHub from the package org.knime.r. There, in executeSnippet on line 205 tempWorkspaceFile is created using FileUtil.createTempFile(String, String). According to the java doc of createTempFile:
Creates a temp file that is deleted when the JVM is shut down. See
From what I see the reset method is not removing this file:
@Override
protected void reset() {
super.reset();
m_librariesInR = null;
}
Now if I found a bug I am happy to report it, but I am concerned because I have real models with some workspaces bigger than 500MB and my server admin might not be really happy with me. In my extension nodes I am having the same problem and I am considering an age filter that removes files after a while. I am highly interested in how you approach this.
Thanks again,
Miguel