sadanand48 commented on code in PR #10838:
URL: https://github.com/apache/ozone/pull/10838#discussion_r3703129071


##########
hadoop-hdds/docs/content/design/snapshot-trapped-deleted-bytes.md:
##########
@@ -0,0 +1,524 @@
+---
+title: Snapshot Trapped Deleted Bytes Accounting
+summary: Per-snapshot accounting of logical data trapped in deleted tables due 
to snapshot references
+date: 2026-07-22
+jira: HDDS-15939
+status: proposed
+author: Sadanand Shenoy
+---
+
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+# Snapshot Trapped Deleted Bytes — Design Doc
+
+## Table of Contents
+
+1. [Motivation](#1-motivation)
+2. [Background](#2-background)
+3. [Goals and Non-Goals](#3-goals-and-non-goals)
+4. [Terminology](#4-terminology)
+5. [Current State](#5-current-state)
+6. [Proposed Design](#6-proposed-design)
+   * [6.1 SnapshotInfo fields](#61-snapshotinfo-fields)
+   * [6.2 ObjectID ledger](#62-objectid-ledger)
+   * [6.3 Counter lifecycle](#63-counter-lifecycle)
+   * [6.4 ExpandAndAccountDirService](#64-expandandaccountdirservice)
+   * [6.5 Integration with existing 
services](#65-integration-with-existing-services)
+7. [Flows](#7-flows)
+8. [Race Conditions and Mitigations](#8-race-conditions-and-mitigations)
+9. [Configuration](#9-configuration)
+10. [API and Observability](#10-api-and-observability)
+11. [Phased Implementation Plan](#11-phased-implementation-plan)
+12. [Testing Strategy](#12-testing-strategy)
+13. [Future Work](#13-future-work)
+
+---
+
+## 1. Motivation
+
+When a key or directory is deleted in a bucket that has snapshots, the delete 
is not immediately
+physical. Metadata moves to `deletedTable` / `deletedDirTable`, and blocks 
remain until background
+services determine that no snapshot in the chain still references the object.
+
+Operators and quota systems need to answer:
+
+> **How much logical deleted data is trapped because of snapshot S?**
+
+Today:
+
+* `OmBucketInfo.snapshotUsedBytes` tracks **bucket-level** pending delete 
space (incremented on

Review Comment:
   exclusiveSize is not of much use here in this doc. 
   exclusiveSize of Snapshot A = only entries that snapshot A holds and none 
others. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to