[ https://issues.apache.org/jira/browse/HDDS-7598 ]


    Sumit Agrawal deleted comment on HDDS-7598:
    -------------------------------------

was (Author: JIRAUSER295412):
*Action over bucket:*
1. Item is Added:
- This is outside of already snapshot, so addition will cause normal increment 
of space and namespace quota.
2. Item is Deleted:
- If the item is part of snapshot also, then item deletion should not cause 
reduce of space and namespace quota
3. Item is modified (currently not supported):
- A modification for item having snapshot, in this case, a copy of item 
metadata with new ObjectId must be created to represent it differently.
And initial + delta quota shoud be added. (This will become different than 
snapshot at OM)

*Action over Snapshot:*
- When snapshot is getting removed, it must reduce the quota only if -- 
Corresponding item is not present in bucket

*Note:* Deletion of item or snapshot need check existence of its pair in bucket 
OR snapshot list, This will be having impact on performance.
 

> Quota for snapshot handling
> ---------------------------
>
>                 Key: HDDS-7598
>                 URL: https://issues.apache.org/jira/browse/HDDS-7598
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Sumit Agrawal
>            Assignee: Sumit Agrawal
>            Priority: Minor
>              Labels: proton
>
> 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).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to