Skip to content

Commit

Permalink
[FLINK-29834] Clear Jackson TypeFactory cache on CL release
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Nov 2, 2022
1 parent 5085c61 commit 00cda36
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.apache.flink.util.Preconditions;
import org.apache.flink.util.UserCodeClassLoader;

import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.type.TypeFactory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -452,6 +454,8 @@ private void releaseClassLoader() {
"Failed to release user code class loader for "
+ Arrays.toString(libraries.toArray()));
}
// clear potential references to user-classes in the singleton cache
TypeFactory.defaultInstance().clearCache();
}

private void runReleaseHooks() {
Expand Down

0 comments on commit 00cda36

Please sign in to comment.