[ https://issues.apache.org/jira/browse/BEAM-6460?focusedWorklogId=186621&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-186621 ]
ASF GitHub Bot logged work on BEAM-6460: ---------------------------------------- Author: ASF GitHub Bot Created on: 17/Jan/19 23:18 Start Date: 17/Jan/19 23:18 Worklog Time Spent: 10m Work Description: mxm commented on pull request #7552: [BEAM-6460] Remove cached class references upon start/shutdown URL: https://github.com/apache/beam/pull/7552#discussion_r248877795 ########## File path: runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/FlinkDoFnFunction.java ########## @@ -133,13 +135,23 @@ public void mapPartition( @Override public void open(Configuration parameters) throws Exception { + // Clear cache to get rid of any references to the Flink Classloader + // See https://jira.apache.org/jira/browse/BEAM-6460 + PipelineOptionsFactory.resetCache(); Review comment: Note that I'm invalidating the cache when starting because the cache immediately reloads from the current classpath. So it doesn't make sense to do that during shutdown where the old classloader is still present. We need a better solution in the long-term. This is just to unblock users. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 186621) Time Spent: 0.5h (was: 20m) > PipelineOptionsFactory may hold on to Classloader after pipeline restart > ------------------------------------------------------------------------ > > Key: BEAM-6460 > URL: https://issues.apache.org/jira/browse/BEAM-6460 > Project: Beam > Issue Type: Bug > Components: runner-flink > Affects Versions: 2.7.0 > Reporter: Maximilian Michels > Assignee: Maximilian Michels > Priority: Blocker > Fix For: 2.10.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > It looks like Jackson has an internal cache which may continue to hold the > Flink application classloader through its {{TypeFactory}} class. When the > pipeline is restarted due to a failure, a new classloader is created which > can result in too many classes being loaded. > Reported on the user mailing list: > https://lists.apache.org/thread.html/e201891684ef3dcffce48d20d1f9be0e19fc2294334362cc7092c0ff@%3Cuser.beam.apache.org%3E -- This message was sent by Atlassian JIRA (v7.6.3#76005)