From 925ebc2133a34a492fed9c73752c261d155a4428 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Wed, 5 Dec 2018 14:58:51 +0000 Subject: [PATCH] Check project state inside the lock --- .../src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java index b505fe3065..3c543f50f5 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java @@ -360,8 +360,8 @@ public class Bridge { String migratedFromID = doc.getMigratedFromID(); if (migratedFromID != null) { Log.info("[{}] Has a migratedFromId: {}", projectName, migratedFromID); - ProjectState sourceState = dbStore.getProjectState(migratedFromID); try (LockGuard __ = lock.lockGuard(migratedFromID)) { + ProjectState sourceState = dbStore.getProjectState(migratedFromID); switch (sourceState) { case NOT_PRESENT: // Normal init-repo