diff options
author | Arthur Martella <arthur.martella.1@att.com> | 2019-04-03 15:58:17 -0400 |
---|---|---|
committer | Arthur Martella <arthur.martella.1@att.com> | 2019-04-03 16:00:04 -0400 |
commit | a1c1b4ba47e9c8ef1fa4e7b8a3ea8ab272050bae (patch) | |
tree | 02890f5cc10174b7439fe9f239c20974df3882c1 /mdbc-server/src/main/java/org | |
parent | 8703beababa99e3cf7c66995f28cf254de54616d (diff) |
Don't call newLocks.put when lockId isn't set
Change-Id: I77f5870265712958979d7832eeb845d51e35cfe3
Issue-ID: MUSIC-374
Signed-off-by: arthur.martella.1@att.com
Diffstat (limited to 'mdbc-server/src/main/java/org')
-rw-r--r-- | mdbc-server/src/main/java/org/onap/music/mdbc/ownership/OwnershipAndCheckpoint.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/ownership/OwnershipAndCheckpoint.java b/mdbc-server/src/main/java/org/onap/music/mdbc/ownership/OwnershipAndCheckpoint.java index b8b26e0..ef98ebd 100644 --- a/mdbc-server/src/main/java/org/onap/music/mdbc/ownership/OwnershipAndCheckpoint.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/ownership/OwnershipAndCheckpoint.java @@ -334,12 +334,11 @@ public class OwnershipAndCheckpoint{ DagNode node = toOwn.nextToOwn(); MusicRangeInformationRow row = node.getRow(); UUID uuid = row.getPartitionIndex(); - if (partition.isLocked() && partition.getMRIIndex().equals(uuid) || - !row.getIsLatest()) { + if (partition.isLocked() && partition.getMRIIndex().equals(uuid) ) { toOwn.setOwn(node); newLocks.put(uuid, new LockResult(true, uuid, partition.getLockId(), false, partition.getSnapshot())); - } else if (newLocks.containsKey(uuid)) { + } else if ( newLocks.containsKey(uuid) || !row.getIsLatest() ) { toOwn.setOwn(node); } else { LockRequest request = new LockRequest(MusicMixin.musicRangeInformationTableName,uuid, |