Skip to content

Commit

Permalink
change log to trace
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoJandre committed Oct 29, 2024
1 parent 3dd52c6 commit 89cc8b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import javax.inject.Inject;

Expand Down Expand Up @@ -106,13 +102,6 @@ public class DefaultSnapshotStrategy extends SnapshotStrategyBase {

private final List<Snapshot.State> snapshotStatesAbleToDeleteSnapshot = Arrays.asList(Snapshot.State.Destroying, Snapshot.State.Destroyed, Snapshot.State.Error, Snapshot.State.Hidden);

private ConcurrentMap<Long, Lock> locks = new ConcurrentHashMap<>();

private Lock getLock(Long id) {
locks.putIfAbsent(id, new ReentrantLock());
return locks.get(id);
}

public SnapshotDataStoreVO getSnapshotImageStoreRef(long snapshotId, long zoneId) {
List<SnapshotDataStoreVO> snaps = snapshotStoreDao.listReadyBySnapshot(snapshotId, DataStoreRole.Image);
for (SnapshotDataStoreVO ref : snaps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public DataStore getStore() {

@Override
public SnapshotInfo getParent() {
logger.debug("Searching for parents of snapshot [{}], in store [{}] with role [{}].", snapshot.getSnapshotId(), store.getId(), store.getRole());
logger.trace("Searching for parents of snapshot [{}], in store [{}] with role [{}].", snapshot.getSnapshotId(), store.getId(), store.getRole());

Check warning on line 116 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotObject.java

View check run for this annotation

Codecov / codecov/patch

engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotObject.java#L116

Added line #L116 was not covered by tests
SnapshotDataStoreVO snapStoreVO = snapshotStoreDao.findByStoreSnapshot(store.getRole(), store.getId(), snapshot.getId());
if (snapStoreVO != null) {
long parentId = snapStoreVO.getParentSnapshotId();

Check warning on line 119 in engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotObject.java

View check run for this annotation

Codecov / codecov/patch

engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/SnapshotObject.java#L119

Added line #L119 was not covered by tests
Expand Down

0 comments on commit 89cc8b4

Please sign in to comment.