HBASE-21387 Addendum fix TestSnapshotFileCache

Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
Ted Yu 2018-11-24 17:00:08 +08:00 committed by zhangduo
parent cc26c8716f
commit 1731666b43
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ public class SnapshotFileCache implements Stoppable {
} }
if (lock == null || lock.tryLock()) { if (lock == null || lock.tryLock()) {
try { try {
if (snapshotManager == null || snapshotManager.isTakingAnySnapshot()) { if (snapshotManager != null && snapshotManager.isTakingAnySnapshot()) {
LOG.warn("Not checking unreferenced files since snapshot is running, it will " LOG.warn("Not checking unreferenced files since snapshot is running, it will "
+ "skip to clean the HFiles this time"); + "skip to clean the HFiles this time");
return unReferencedFiles; return unReferencedFiles;