Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Snapshot is created as a copy of OM DB at that point of time for the bucket. Here, quota consumed will be shared between active and snapshot DB.
space-quota: diskspace as used by keys/files remains same when snapshot is taken. Same block content are referrred by both active DB and snapshot DB. Eg:
- In active DB, a key is created with 1GB space. (reference count is 1)
- A snapshot is taken and key is a part of snapshot, so Reference count becomes "2". And space qouta remains same as consumed.
- If any further snapshot is taken and key is present in snapshot, reference count is increased. While if snapshot is removed, reference count gets decremented.
- If reference count becomes "0", quota is released as key is getting deleted.
namespace-quota: This is the number of keys and files in bucket recursively for the bucket. For snapshot, this is also shared with active DB (reference counted).
So, snapshot in Ozone does not consume extra namespace and space-quota whenever snapshot is created.
Handling of Quota release when key/files/directories are getting removed:
- Whenever a snapshot is deleted, it will check if entity (keys/files/directories) present in deletedTable/deletedDirectory table are also being referred by previous snapshot
- If previous snapshot also have same entity is present, then the entity will be moved from deletedTable/deletedDirectory table of current snapshot to previous snapshot DB.
- If not present, then it will perform cleanup of entity (cleanup of blocks) and while purge will handle quota (similar to active DB key and directory deleting service).
Attachments
Issue Links
- is a child of
-
HDDS-7479 Investigate -100% Volume and bucket quotas working
- Resolved
- links to