RFR: 1012: Lots of "unhealthy" jdk repos found in scratch dirs

Erik Joelsson erikj at openjdk.java.net
Wed May 5 21:09:10 UTC 2021

On Wed, 5 May 2021 21:05:47 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> Add --dissociate when cloning a repo using a seed. It's simply not safe to share objects between repos when we remove objects in the seed repo (which happens automatically behind the scenes when git GCs). This is documented in the git-clone man page. Changing this will increase disk usage some, but that's something we just have to live with.

forge/src/main/java/org/openjdk/skara/forge/HostedRepositoryPool.java line 120:

> 118:         private void removeOldClone(Path path, String reason) {
> 119:             if (Files.exists(path)) {
> 120:                 var preserved = path.resolveSibling(path.getFileName().toString() + "-" + reason + "-" + UUID.randomUUID());

The filename here was based on the seed repo (which usually has a .git suffix) instead of the scratch repo that we are copying. That didn't really make sense.


PR: https://git.openjdk.java.net/skara/pull/1146

More information about the skara-dev mailing list