Skip to content

Conversation

@tanvipenumudy
Copy link
Contributor

What changes were proposed in this pull request?

The PR extends GET /api/v1/keys/deletePending/dirs/summary endpoint to include totalUnreplicatedDataSize and totalReplicatedDataSize fields for tracking the total pending deletion size for FSO directories in OM.

  • totalReplicatedDataSize: Total size of directories pending deletion with expected replicated size.
  • totalUnreplicatedDataSize: Total raw size of directories pending deletion without replicated size.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-13188

How was this patch tested?

Manual Testing:

bash-5.1$ ozone sh volume create vol1
bash-5.1$ ozone sh bucket create vol1/buck1 --layout=FILE_SYSTEM_OPTIMIZED
bash-5.1$ ozone fs -mkdir -p ofs://om/vol1/buck1/dir1/dir2/dir3

# Create 1 MB file:
bash-5.1$ dd if=/dev/zero of=test.txt bs=1M count=1
bash-5.1$ ozone fs -put test.txt ofs://om/vol1/buck1/dir1/file1
bash-5.1$ ozone fs -put test.txt ofs://om/vol1/buck1/dir1/dir2/file2
bash-5.1$ ozone fs -put test.txt ofs://om/vol1/buck1/dir1/dir2/dir3/file3

Directory structure:

dir1/
    ├── file1 (1 MB)
    └── dir2/
        ├── file2 (1 MB)
        └── dir3/
            └── file3 (1 MB)

# Recursively delete top-level directory:
bash-5.1$ ozone fs -rm -r ofs://om/vol1/buck1/dir1

GET /api/v1/keys/deletePending/dirs/summary:

Before https://github.com/apache/ozone/pull/8568:

{
  "totalDeletedDirectories": 1,
  "totalReplicatedDataSize": 0,
  "totalUnreplicatedDataSize": 3145728
}

After https://github.com/apache/ozone/pull/8568:

{
  "totalDeletedDirectories": 1,
  "totalReplicatedDataSize": 9437184,
  "totalUnreplicatedDataSize": 3145728
}

@tanvipenumudy
Copy link
Contributor Author

Closed the current PR, changed the base branch from master to HDDS-13177 on the existing PR: #8591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants