You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ck...@apache.org on 2022/11/01 03:42:44 UTC
[ozone] branch master updated: HDDS-7447. Leak of TableIterator in DirectoryDeletingService. (#3922)
This is an automated email from the ASF dual-hosted git repository.
ckj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new c7f1c7c9ee HDDS-7447. Leak of TableIterator in DirectoryDeletingService. (#3922)
c7f1c7c9ee is described below
commit c7f1c7c9ee615177ecac6fad624c52fcd801442f
Author: Duong Nguyen <du...@gmail.com>
AuthorDate: Mon Oct 31 20:42:39 2022 -0700
HDDS-7447. Leak of TableIterator in DirectoryDeletingService. (#3922)
---
hadoop-ozone/dev-support/intellij/log4j.properties | 2 ++
.../apache/hadoop/ozone/om/service/DirectoryDeletingService.java | 7 +++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hadoop-ozone/dev-support/intellij/log4j.properties b/hadoop-ozone/dev-support/intellij/log4j.properties
index bc62e32219..8b8ba6b3ef 100644
--- a/hadoop-ozone/dev-support/intellij/log4j.properties
+++ b/hadoop-ozone/dev-support/intellij/log4j.properties
@@ -16,3 +16,5 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
log4j.logger.io.jagertraecing=DEBUG
+
+log4j.logger.org.apache.hadoop.hdds.utils.db.managed=DEBUG
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 8115b17608..834361bbfe 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
@@ -144,10 +144,9 @@ public class DirectoryDeletingService extends BackgroundService {
List<PurgePathRequest> purgePathRequestList = new ArrayList<>();
Table.KeyValue<String, OmKeyInfo> pendingDeletedDirInfo;
- try {
- TableIterator<String, ? extends KeyValue<String, OmKeyInfo>>
- deleteTableIterator = ozoneManager.getMetadataManager().
- getDeletedDirTable().iterator();
+ try (TableIterator<String, ? extends KeyValue<String, OmKeyInfo>>
+ deleteTableIterator = ozoneManager.getMetadataManager().
+ getDeletedDirTable().iterator()) {
long startTime = Time.monotonicNow();
while (remainNum > 0 && deleteTableIterator.hasNext()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org