Skip to content

Commit

Permalink
Merge pull request #69 from bjoernhaeuser/synchronise-on-project
Browse files Browse the repository at this point in the history
[JENKINS-41880] Synchronise on Fingerprint
  • Loading branch information
jglick committed May 11, 2018
2 parents e00c616 + cca5639 commit c38b852
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -257,6 +257,7 @@ public static void addFromFacet(@CheckForNull String ancestorImageId, @Nonnull S
long timestamp = System.currentTimeMillis();
if (ancestorImageId != null) {
Fingerprint f = forImage(run, ancestorImageId);
synchronized (f) {
Collection<FingerprintFacet> facets = f.getFacets();
DockerDescendantFingerprintFacet descendantFacet = null;
for (FingerprintFacet facet : facets) {
Expand All @@ -278,8 +279,10 @@ public static void addFromFacet(@CheckForNull String ancestorImageId, @Nonnull S
} finally {
bc.abort();
}
}
}
Fingerprint f = forImage(run, descendantImageId);
synchronized (f) {
Collection<FingerprintFacet> facets = f.getFacets();
DockerAncestorFingerprintFacet ancestorFacet = null;
for (FingerprintFacet facet : facets) {
Expand All @@ -303,6 +306,7 @@ public static void addFromFacet(@CheckForNull String ancestorImageId, @Nonnull S
} finally {
bc.abort();
}
}
}

}

0 comments on commit c38b852

Please sign in to comment.