[crac] RFR: Clear JarFileFactory cache on checkpoint [v2]
Anton Kozlov
akozlov at openjdk.java.net
Tue Feb 8 14:00:22 UTC 2022
On Tue, 8 Feb 2022 13:37:08 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
>> Even after an URL object referring to a jar file is closed, the JarFile remains cached and open. This change cleans the cache, so the JarFile becomes reclaimable. The only user of the changed class, sun.net.www.protocol.jar.JarURLConnection, does not assume any state of the cache.
>
> Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>
> Avoid beforeCheckpoint race with JarURLConnection.connect()
@alexeybakhtin pointed out that JarURLConnection.connect method was not synchronized with the JarFileFactory.beforeCheckpoint, which could lead to NPE due to entry cleaned from the cache while connect is executed. Now beforeCheckpoint detects JarFile entries that should be cleaned by moving them to a weak cache map for a short period of time.
-------------
PR: https://git.openjdk.java.net/crac/pull/14
More information about the crac-dev
mailing list