From: Mohammad Salehe Date: Fri, 8 Feb 2019 16:25:38 +0000 (-0500) Subject: More detailed error messages for lock references X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F32%2F78132%2F4;p=music.git More detailed error messages for lock references Change-Id: Id2be5f781e95e2252b6e8cafecc0fd18f2ed5366 Issue-ID: MUSIC-148 Signed-off-by: Mohammad Salehe --- diff --git a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java index 1866a5c7..343ba1f1 100644 --- a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java +++ b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java @@ -185,19 +185,19 @@ public class MusicCassaCore implements MusicCoreService { return new ReturnType(ResultType.SUCCESS, lockReference + " can read the values"); } logger.info(EELFLoggerDelegate.applicationLogger, - lockReference + " is not the lock holder yet"); + primaryKeyValue + " " + lockReference + " is not the lock holder yet"); return new ReturnType(ResultType.FAILURE, lockReference + " is not the lock holder yet"); } if (lockReferenceL < topOfLockStoreL) { logger.info(EELFLoggerDelegate.applicationLogger, - lockReference + " is no longer/or was never in the lock store queue"); + primaryKeyValue + " " + lockReference + " is no longer/or was never in the lock store queue"); return new ReturnType(ResultType.FAILURE, lockReference + " is no longer/or was never in the lock store queue"); } - return new ReturnType(ResultType.SUCCESS, lockReference + " is top of lock store"); + return new ReturnType(ResultType.SUCCESS, primaryKeyValue + " " + lockReference + " is top of lock store"); } finally { TimeMeasureInstance.instance().exit(); @@ -241,7 +241,7 @@ public class MusicCassaCore implements MusicCoreService { getLockingServiceHandle().updateLockAcquireTime(keyspace, table, primaryKeyValue, lockReference); - return new ReturnType(ResultType.SUCCESS, lockReference + " is the lock holder for the key"); + return new ReturnType(ResultType.SUCCESS, primaryKeyValue + " " + lockReference + " is the lock holder for the key"); } finally { TimeMeasureInstance.instance().exit();