More detailed error messages for lock references 32/78132/4
authorMohammad Salehe <salehe@cs.toronto.edu>
Fri, 8 Feb 2019 16:25:38 +0000 (11:25 -0500)
committerMohammad Salehe <salehe@cs.toronto.edu>
Mon, 25 Feb 2019 03:23:39 +0000 (22:23 -0500)
Change-Id: Id2be5f781e95e2252b6e8cafecc0fd18f2ed5366
Issue-ID: MUSIC-148
Signed-off-by: Mohammad Salehe <salehe@cs.toronto.edu>
src/main/java/org/onap/music/service/impl/MusicCassaCore.java

index 1866a5c..343ba1f 100644 (file)
@@ -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();