[
https://issues.apache.org/jira/browse/HDDS-7598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sumit Agrawal updated HDDS-7598:
--------------------------------
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).
was:
when snapshot is created, need handle quota:
# snapshot info: can show quota as snapshot info
# quota update for keys/directory when delete snapshot or item
> 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]