You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "swamirishi (via GitHub)" <gi...@apache.org> on 2025/06/03 03:37:34 UTC
[PR] HDDS-13034. Refactor Directory Deleting Service to use ReclaimableDirectoryFilter & ReclaimableKeyFilter [ozone]
swamirishi opened a new pull request, #8546:
URL: https://github.com/apache/ozone/pull/8546
## What changes were proposed in this pull request?
With implementation of ReclaimableKeyFilter & ReclaimableDirectoryFilter both snapshot directory deep cleaning and AOS DirectoryDeletingService can be unified which will simplify the entire implementation rather than having multiple implementations for DirectoryDeletingService.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13034
## How was this patch tested?
Existing unit tests and additional assertions added on existing tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2134371191
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -323,8 +323,8 @@ public BackgroundTaskResult call() {
SnapshotUtils.getSnapshotInfo(getOzoneManager(), snapshotChainManager, snapshotId);
if (snapInfo != null) {
if (snapInfo.isDeepCleaned()) {
- LOG.info("Snapshot {} has already been deep cleaned. Skipping the snapshot in this iteration.",
- snapInfo.getSnapshotId());
+ LOG.info("Snapshot '{}' ({}) has already been deep cleaned. Skipping the snapshot in this iteration. ",
Review Comment:
nit. oops sorry i should have caught this extra space earlier
```suggestion
LOG.info("Snapshot '{}' ({}) has already been deep cleaned. Skipping the snapshot in this iteration.",
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on PR #8546:
URL: https://github.com/apache/ozone/pull/8546#issuecomment-2954782224
Thank you for reviewing the PR @smengcl & @jojochuang .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor Directory Deleting Service to use ReclaimableDirectoryFilter & ReclaimableKeyFilter [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2131561575
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java:
##########
@@ -387,12 +387,16 @@ public final class OMConfigKeys {
*/
public static final String OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED = "ozone.snapshot.deep.cleaning.enabled";
public static final boolean OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED_DEFAULT = false;
+ @Deprecated
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_INTERVAL =
"ozone.snapshot.directory.service.interval";
+ @Deprecated
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_INTERVAL_DEFAULT
= "24h";
+ @Deprecated
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_TIMEOUT =
"ozone.snapshot.directory.service.timeout";
+ @Deprecated
Review Comment:
no longer used.
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java:
##########
@@ -387,12 +387,16 @@ public final class OMConfigKeys {
*/
public static final String OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED = "ozone.snapshot.deep.cleaning.enabled";
public static final boolean OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED_DEFAULT = false;
+ @Deprecated
Review Comment:
no longer used.
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java:
##########
@@ -387,12 +387,16 @@ public final class OMConfigKeys {
*/
public static final String OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED = "ozone.snapshot.deep.cleaning.enabled";
public static final boolean OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED_DEFAULT = false;
+ @Deprecated
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_INTERVAL =
"ozone.snapshot.directory.service.interval";
+ @Deprecated
Review Comment:
no longer used.
##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3795,9 +3795,9 @@
<property>
<name>ozone.snapshot.directory.service.interval</name>
<value>24h</value>
- <tag>OZONE, PERFORMANCE, OM</tag>
+ <tag>OZONE, PERFORMANCE, OM, DEPRECATED</tag>
<description>
- The time interval between successive SnapshotDirectoryCleaningService
+ DEPRECATED. The time interval between successive SnapshotDirectoryCleaningService
Review Comment:
Deprecated because it is replaced by DirectoryDeletingService
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestDirectoryDeletingServiceWithFSO.java:
##########
@@ -749,30 +748,29 @@ public void testDirDeletedTableCleanUpForSnapshot() throws Exception {
assertSubPathsCount(dirDeletingService::getMovedFilesCount, 0);
assertSubPathsCount(dirDeletingService::getMovedDirsCount, 0);
assertSubPathsCount(dirDeletingService::getDeletedDirsCount, 0);
-
// Case-2) Delete dir
fs.delete(root, true);
// After delete. 5 sub files are still in keyTable.
// 4 dirs in dirTable.
Review Comment:
```suggestion
// 0 dirs in dirTable.
```
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java:
##########
@@ -387,12 +387,16 @@ public final class OMConfigKeys {
*/
public static final String OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED = "ozone.snapshot.deep.cleaning.enabled";
public static final boolean OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED_DEFAULT = false;
+ @Deprecated
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_INTERVAL =
"ozone.snapshot.directory.service.interval";
+ @Deprecated
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_INTERVAL_DEFAULT
= "24h";
+ @Deprecated
Review Comment:
no longer used.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -76,31 +92,33 @@ public class DirectoryDeletingService extends AbstractKeyDeletingService {
// Using multi thread for DirDeletion. Multiple threads would read
// from parent directory info from deleted directory table concurrently
// and send deletion requests.
- private final int dirDeletingCorePoolSize;
Review Comment:
Javadoc:
```
/**
* Background service responsible for purging deleted directories and files
* in the Ozone Manager (OM) and associated snapshots.
*
* <p>
* This service periodically scans the deleted directory table and submits
* purge requests for directories and their sub-entries (subdirectories and files).
* It operates in both the active object store (AOS) and across all deep-clean enabled
* snapshots. The service supports parallel processing using a thread pool and
* coordinates exclusive size calculations and cleanup status updates for
* snapshots.
* </p>
*
* <h2>Key Features</h2>
* <ul>
* <li>Processes deleted directories in both the active OM and all snapshots
* with deep cleaning enabled.</li>
* <li>Uses a thread pool to parallelize deletion tasks within each store or snapshot.</li>
* <li>Employs filters to determine reclaimability of directories and files,
* ensuring safety with respect to snapshot chains.</li>
* <li>Tracks and updates exclusive size and replicated exclusive size for each
* snapshot as directories and files are reclaimed.</li>
* <li>Updates the "deep cleaned" flag for snapshots after a successful run.</li>
* <li>Handles error and race conditions gracefully, deferring work if necessary.</li>
* </ul>
*
* <h2>Constructor Parameters</h2>
* <ul>
* <li><b>interval</b> - How often the service runs.</li>
* <li><b>unit</b> - Time unit for the interval.</li>
* <li><b>serviceTimeout</b> - Service timeout in the given time unit.</li>
* <li><b>ozoneManager</b> - The OzoneManager instance.</li>
* <li><b>configuration</b> - Ozone configuration object.</li>
* <li><b>dirDeletingServiceCorePoolSize</b> - Number of parallel threads for deletion per store or snapshot.</li>
* <li><b>deepCleanSnapshots</b> - Whether to enable deep cleaning for snapshots.</li>
* </ul>
*
* <h2>Threading and Parallelism</h2>
* <ul>
* <li>Uses a configurable thread pool for parallel deletion tasks within each store/snapshot.</li>
* <li>Each snapshot and AOS get a separate background task for deletion.</li>
* </ul>
*
* <h2>Snapshot Integration</h2>
* <ul>
* <li>Iterates all snapshots in the chain if deep cleaning is enabled.</li>
* <li>Skips snapshots that are already deep-cleaned or not yet flushed to disk.</li>
* <li>Updates snapshot metadata to reflect size changes and cleaning status.</li>
* </ul>
*
* <h2>Usage</h2>
* <ul>
* <li>Should be scheduled as a background service in OM.</li>
* <li>Intended to be run only on the OM leader node.</li>
* </ul>
*
* @see org.apache.hadoop.ozone.om.snapshot.filter.ReclaimableDirFilter
* @see org.apache.hadoop.ozone.om.snapshot.filter.ReclaimableKeyFilter
* @see org.apache.hadoop.ozone.om.SnapshotChainManager
*/
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestDirectoryDeletingServiceWithFSO.java:
##########
@@ -749,30 +748,29 @@ public void testDirDeletedTableCleanUpForSnapshot() throws Exception {
assertSubPathsCount(dirDeletingService::getMovedFilesCount, 0);
assertSubPathsCount(dirDeletingService::getMovedDirsCount, 0);
assertSubPathsCount(dirDeletingService::getDeletedDirsCount, 0);
-
// Case-2) Delete dir
fs.delete(root, true);
// After delete. 5 sub files are still in keyTable.
// 4 dirs in dirTable.
assertTableRowCount(keyTable, 5);
- assertTableRowCount(dirTable, 4);
+ assertTableRowCount(dirTable, 0);
// KeyDeletingService and DirectoryDeletingService will not
// clean up because the paths are part of a snapshot.
// As a result on 1 deleted dir and 3 deleted files will
Review Comment:
```suggestion
// As a result on 5 deleted dir and 3 deleted files will
```
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java:
##########
@@ -387,12 +387,16 @@ public final class OMConfigKeys {
*/
public static final String OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED = "ozone.snapshot.deep.cleaning.enabled";
public static final boolean OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED_DEFAULT = false;
+ @Deprecated
Review Comment:
can you add a javadoc here saying the following few static variables are deprecated because snapshot directory service is replaced by directory deleting service.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2134345701
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -165,208 +222,274 @@ public void setRatisByteLimit(int ratisByteLimit) {
@Override
public BackgroundTaskQueue getTasks() {
BackgroundTaskQueue queue = new BackgroundTaskQueue();
- if (taskCount.get() > 0) {
- LOG.info("{} Directory deleting task(s) already in progress.",
- taskCount.get());
- return queue;
- }
- try {
- deletedDirSupplier.reInitItr();
- } catch (IOException ex) {
- LOG.error("Unable to get the iterator.", ex);
- return queue;
- }
- taskCount.set(dirDeletingCorePoolSize);
- for (int i = 0; i < dirDeletingCorePoolSize; i++) {
- queue.add(new DirectoryDeletingService.DirDeletingTask(this));
+ queue.add(new DirDeletingTask(this, null));
+ if (deepCleanSnapshots) {
+ Iterator<UUID> iterator = null;
+ try {
+ iterator = snapshotChainManager.iterator(true);
+ } catch (IOException e) {
+ LOG.error("Error while initializing snapshot chain iterator.");
Review Comment:
```suggestion
LOG.error("Error while initializing snapshot chain iterator. Will run DirDeletingTask on AOS only.");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor Directory Deleting Service to use ReclaimableDirectoryFilter & ReclaimableKeyFilter [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2132663729
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestDirectoryDeletingServiceWithFSO.java:
##########
@@ -749,30 +748,29 @@ public void testDirDeletedTableCleanUpForSnapshot() throws Exception {
assertSubPathsCount(dirDeletingService::getMovedFilesCount, 0);
assertSubPathsCount(dirDeletingService::getMovedDirsCount, 0);
assertSubPathsCount(dirDeletingService::getDeletedDirsCount, 0);
-
// Case-2) Delete dir
fs.delete(root, true);
// After delete. 5 sub files are still in keyTable.
// 4 dirs in dirTable.
assertTableRowCount(keyTable, 5);
- assertTableRowCount(dirTable, 4);
+ assertTableRowCount(dirTable, 0);
// KeyDeletingService and DirectoryDeletingService will not
// clean up because the paths are part of a snapshot.
// As a result on 1 deleted dir and 3 deleted files will
Review Comment:
done
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -76,31 +92,33 @@ public class DirectoryDeletingService extends AbstractKeyDeletingService {
// Using multi thread for DirDeletion. Multiple threads would read
// from parent directory info from deleted directory table concurrently
// and send deletion requests.
- private final int dirDeletingCorePoolSize;
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor Directory Deleting Service to use ReclaimableDirectoryFilter & ReclaimableKeyFilter [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2132663219
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java:
##########
@@ -387,12 +387,16 @@ public final class OMConfigKeys {
*/
public static final String OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED = "ozone.snapshot.deep.cleaning.enabled";
public static final boolean OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED_DEFAULT = false;
+ @Deprecated
Review Comment:
done
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestDirectoryDeletingServiceWithFSO.java:
##########
@@ -749,30 +748,29 @@ public void testDirDeletedTableCleanUpForSnapshot() throws Exception {
assertSubPathsCount(dirDeletingService::getMovedFilesCount, 0);
assertSubPathsCount(dirDeletingService::getMovedDirsCount, 0);
assertSubPathsCount(dirDeletingService::getDeletedDirsCount, 0);
-
// Case-2) Delete dir
fs.delete(root, true);
// After delete. 5 sub files are still in keyTable.
// 4 dirs in dirTable.
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2133633325
##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3786,7 +3786,7 @@
<property>
<name>ozone.snapshot.directory.service.timeout</name>
<value>300s</value>
- <tag>OZONE, PERFORMANCE, OM</tag>
+ <tag>OZONE, PERFORMANCE, OM, DEPRECATED</tag>
<description>
Timeout value for SnapshotDirectoryCleaningService.
Review Comment:
```suggestion
DEPRECATED. Timeout value for SnapshotDirectoryCleaningService.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2134322264
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -323,8 +323,8 @@ public BackgroundTaskResult call() {
SnapshotUtils.getSnapshotInfo(getOzoneManager(), snapshotChainManager, snapshotId);
if (snapInfo != null) {
if (snapInfo.isDeepCleaned()) {
- LOG.info("Snapshot {} has already been deep cleaned. Skipping the snapshot in this iteration.",
- snapInfo.getSnapshotId());
+ LOG.info("Snapshot {} has already been deep cleaned. Skipping the snapshot in this iteration. " +
+ "Snapshot name : {}", snapInfo.getSnapshotId(), snapInfo.getName());
Review Comment:
```suggestion
LOG.info("Snapshot '{}' ({}) has already been deep cleaned. Skipping the snapshot in this iteration.",
snapInfo.getName(), snapInfo.getSnapshotId());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2135033620
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -323,8 +323,8 @@ public BackgroundTaskResult call() {
SnapshotUtils.getSnapshotInfo(getOzoneManager(), snapshotChainManager, snapshotId);
if (snapInfo != null) {
if (snapInfo.isDeepCleaned()) {
- LOG.info("Snapshot {} has already been deep cleaned. Skipping the snapshot in this iteration.",
- snapInfo.getSnapshotId());
+ LOG.info("Snapshot '{}' ({}) has already been deep cleaned. Skipping the snapshot in this iteration. ",
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi merged PR #8546:
URL: https://github.com/apache/ozone/pull/8546
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "sumitagrawl (via GitHub)" <gi...@apache.org>.
sumitagrawl commented on PR #8546:
URL: https://github.com/apache/ozone/pull/8546#issuecomment-3222875573
@swamirishi @smengcl There is an issue with runCnt, all threads use same runCnt, which is problamatic, every call to ratis must have different runCnt. With this refactoring, this problem is introduced
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2134348302
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -165,208 +222,274 @@ public void setRatisByteLimit(int ratisByteLimit) {
@Override
public BackgroundTaskQueue getTasks() {
BackgroundTaskQueue queue = new BackgroundTaskQueue();
- if (taskCount.get() > 0) {
- LOG.info("{} Directory deleting task(s) already in progress.",
- taskCount.get());
- return queue;
- }
- try {
- deletedDirSupplier.reInitItr();
- } catch (IOException ex) {
- LOG.error("Unable to get the iterator.", ex);
- return queue;
- }
- taskCount.set(dirDeletingCorePoolSize);
- for (int i = 0; i < dirDeletingCorePoolSize; i++) {
- queue.add(new DirectoryDeletingService.DirDeletingTask(this));
+ queue.add(new DirDeletingTask(this, null));
+ if (deepCleanSnapshots) {
+ Iterator<UUID> iterator = null;
+ try {
+ iterator = snapshotChainManager.iterator(true);
+ } catch (IOException e) {
+ LOG.error("Error while initializing snapshot chain iterator.");
Review Comment:
done
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -323,8 +323,8 @@ public BackgroundTaskResult call() {
SnapshotUtils.getSnapshotInfo(getOzoneManager(), snapshotChainManager, snapshotId);
if (snapInfo != null) {
if (snapInfo.isDeepCleaned()) {
- LOG.info("Snapshot {} has already been deep cleaned. Skipping the snapshot in this iteration.",
- snapInfo.getSnapshotId());
+ LOG.info("Snapshot {} has already been deep cleaned. Skipping the snapshot in this iteration. " +
+ "Snapshot name : {}", snapInfo.getSnapshotId(), snapInfo.getName());
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2134345701
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -165,208 +222,274 @@ public void setRatisByteLimit(int ratisByteLimit) {
@Override
public BackgroundTaskQueue getTasks() {
BackgroundTaskQueue queue = new BackgroundTaskQueue();
- if (taskCount.get() > 0) {
- LOG.info("{} Directory deleting task(s) already in progress.",
- taskCount.get());
- return queue;
- }
- try {
- deletedDirSupplier.reInitItr();
- } catch (IOException ex) {
- LOG.error("Unable to get the iterator.", ex);
- return queue;
- }
- taskCount.set(dirDeletingCorePoolSize);
- for (int i = 0; i < dirDeletingCorePoolSize; i++) {
- queue.add(new DirectoryDeletingService.DirDeletingTask(this));
+ queue.add(new DirDeletingTask(this, null));
+ if (deepCleanSnapshots) {
+ Iterator<UUID> iterator = null;
+ try {
+ iterator = snapshotChainManager.iterator(true);
+ } catch (IOException e) {
+ LOG.error("Error while initializing snapshot chain iterator.");
Review Comment:
```suggestion
LOG.error("Error while initializing snapshot chain iterator. DirDeletingTask will only process AOS this run.");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2134348453
##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3786,7 +3786,7 @@
<property>
<name>ozone.snapshot.directory.service.timeout</name>
<value>300s</value>
- <tag>OZONE, PERFORMANCE, OM</tag>
+ <tag>OZONE, PERFORMANCE, OM, DEPRECATED</tag>
<description>
Timeout value for SnapshotDirectoryCleaningService.
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2134345701
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -165,208 +222,274 @@ public void setRatisByteLimit(int ratisByteLimit) {
@Override
public BackgroundTaskQueue getTasks() {
BackgroundTaskQueue queue = new BackgroundTaskQueue();
- if (taskCount.get() > 0) {
- LOG.info("{} Directory deleting task(s) already in progress.",
- taskCount.get());
- return queue;
- }
- try {
- deletedDirSupplier.reInitItr();
- } catch (IOException ex) {
- LOG.error("Unable to get the iterator.", ex);
- return queue;
- }
- taskCount.set(dirDeletingCorePoolSize);
- for (int i = 0; i < dirDeletingCorePoolSize; i++) {
- queue.add(new DirectoryDeletingService.DirDeletingTask(this));
+ queue.add(new DirDeletingTask(this, null));
+ if (deepCleanSnapshots) {
+ Iterator<UUID> iterator = null;
+ try {
+ iterator = snapshotChainManager.iterator(true);
+ } catch (IOException e) {
+ LOG.error("Error while initializing snapshot chain iterator.");
Review Comment:
```suggestion
LOG.error("Error while initializing snapshot chain iterator. Will run DirDeletingTask only on AOS this run.");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13034. Refactor DirectoryDeletingService to use ReclaimableDirFilter and ReclaimableKeyFilter [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8546:
URL: https://github.com/apache/ozone/pull/8546#discussion_r2134345701
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -165,208 +222,274 @@ public void setRatisByteLimit(int ratisByteLimit) {
@Override
public BackgroundTaskQueue getTasks() {
BackgroundTaskQueue queue = new BackgroundTaskQueue();
- if (taskCount.get() > 0) {
- LOG.info("{} Directory deleting task(s) already in progress.",
- taskCount.get());
- return queue;
- }
- try {
- deletedDirSupplier.reInitItr();
- } catch (IOException ex) {
- LOG.error("Unable to get the iterator.", ex);
- return queue;
- }
- taskCount.set(dirDeletingCorePoolSize);
- for (int i = 0; i < dirDeletingCorePoolSize; i++) {
- queue.add(new DirectoryDeletingService.DirDeletingTask(this));
+ queue.add(new DirDeletingTask(this, null));
+ if (deepCleanSnapshots) {
+ Iterator<UUID> iterator = null;
+ try {
+ iterator = snapshotChainManager.iterator(true);
+ } catch (IOException e) {
+ LOG.error("Error while initializing snapshot chain iterator.");
Review Comment:
```suggestion
LOG.error("Error while initializing snapshot chain iterator. Will run on AOS only.");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org