From 464616d69739f73498796e66f136e35900b91206 Mon Sep 17 00:00:00 2001 From: mlm483 <128052931+mlm483@users.noreply.github.com> Date: Mon, 11 Dec 2023 15:10:37 -0500 Subject: [PATCH 1/3] [BI-2027] - improved logging in ProgramCache --- .../java/org/breedinginsight/daos/cache/ProgramCache.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/breedinginsight/daos/cache/ProgramCache.java b/src/main/java/org/breedinginsight/daos/cache/ProgramCache.java index cb28fb67f..4f9798b9b 100644 --- a/src/main/java/org/breedinginsight/daos/cache/ProgramCache.java +++ b/src/main/java/org/breedinginsight/daos/cache/ProgramCache.java @@ -56,6 +56,7 @@ public void populate(List keys) { public void populate(@NotNull UUID key) { String cacheKey = generateCacheKey(key); + log.debug("populate(UUID key) method called with key: " + cacheKey); RSemaphore semaphore = connection.getSemaphore(cacheKey+":semaphore"); semaphore.trySetPermits(1); @@ -72,7 +73,7 @@ public void populate(@NotNull UUID key) { next refresh will pick up data persisted by this thread */ if(queueSemaphore.tryAcquire()) { - log.debug("Attempting to refresh"); + log.debug("Attempting to refresh for: " + cacheKey); try { // block until we get the green light to refresh the cache semaphore.acquire(); @@ -139,11 +140,11 @@ public Map get(UUID key) throws ApiException { if (!connection.getBucket(cacheKey).isExists()) { RSemaphore semaphore = connection.getSemaphore(cacheKey + ":semaphore"); try { - log.debug("cache miss, populating"); + log.debug("cache miss, populating for key: " + cacheKey); populate(key); //block until any updates are done semaphore.acquire(); - log.debug("Cache loading done!!!!"); + log.debug("Cache loading done!!!! - key: " + cacheKey); } catch(Exception e){ throw new ApiException(e); } finally { From 54924ec978371314eb741eac3f68ac8316d804df Mon Sep 17 00:00:00 2001 From: mlm483 <128052931+mlm483@users.noreply.github.com> Date: Mon, 11 Dec 2023 15:24:08 -0500 Subject: [PATCH 2/3] [BI-2027] - added edge case log --- src/main/java/org/breedinginsight/daos/cache/ProgramCache.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/breedinginsight/daos/cache/ProgramCache.java b/src/main/java/org/breedinginsight/daos/cache/ProgramCache.java index 4f9798b9b..d231116ae 100644 --- a/src/main/java/org/breedinginsight/daos/cache/ProgramCache.java +++ b/src/main/java/org/breedinginsight/daos/cache/ProgramCache.java @@ -111,6 +111,8 @@ public void populate(@NotNull UUID key) { RMap map = connection.getMap(cacheKey); map.clear(); map.putAll(entryMap); + } else { + log.debug("No values to cache for key: " + cacheKey); } log.debug("cache loading complete for key: " + cacheKey); } catch (Exception e) { From 9dfdc18f78e273f53b1859967782ccf541d332db Mon Sep 17 00:00:00 2001 From: rob-ouser-bi Date: Thu, 14 Dec 2023 16:36:13 +0000 Subject: [PATCH 3/3] [autocommit] bumping build number --- src/main/resources/version.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/version.properties b/src/main/resources/version.properties index 16760a984..c744aa15f 100644 --- a/src/main/resources/version.properties +++ b/src/main/resources/version.properties @@ -14,5 +14,5 @@ # limitations under the License. # -version=v0.9.0+646 -versionInfo=https://github.com/Breeding-Insight/bi-api/commit/5025cd0f7f5b3abb54e0778074c48d6b1586c71b +version=v0.9.0+648 +versionInfo=https://github.com/Breeding-Insight/bi-api/commit/cedfdd85a4f25316eb889646cbab8186f9e17346