From d647921d137b22250a9a7650cafd06847006965c Mon Sep 17 00:00:00 2001 From: Aswin Shakil Balasubramanian Date: Wed, 27 Sep 2023 19:00:29 -0700 Subject: [PATCH] Fix checkstyle. --- .../hadoop/ozone/om/service/DirectoryDeletingService.java | 3 ++- .../hadoop/ozone/om/service/SnapshotDeletingService.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java index d93bd4ab202..eb83eb8ae52 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java @@ -329,7 +329,8 @@ private void expandSnapshotDirectories(long remainNum) throws IOException { if (isBufferLimitCrossed(ratisByteLimit, consumedSize, request.getSerializedSize())) { if (purgePathRequestList.size() != 0) { - // if message buffer reaches max limit, avoid sending further + // if message buffer reaches max limit, + // avoid sending further remainNum = 0; break; } diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java index cc275b4e8e6..668c956f7f7 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java @@ -402,7 +402,7 @@ private long handleDirectoryCleanUp( long startTime = Time.monotonicNow(); deletedDirIterator.seek(dbBucketKeyForDir); - while (deletedDirIterator.hasNext()) { + while (remainNum > 0 && deletedDirIterator.hasNext()) { Table.KeyValue deletedDir = deletedDirIterator.next(); String deletedDirKey = deletedDir.getKey();