[
https://issues.apache.org/jira/browse/HBASE-22086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16809317#comment-16809317
]
Josh Elser commented on HBASE-22086:
------------------------------------
{code:java}
+ // Remove old table snapshots data
+ removeExistingTableSnapshotSizes();
+
// For each table, compute the size of each snapshot
Map<String,Long> namespaceSnapshotSizes =
computeSnapshotSizes(snapshotsToComputeSize);
+ // Remove old namespace snapshots data
+ removeExistingNamespaceSnapshotSizes();
+
// Write the size data by namespaces to the quota table.
// We need to do this "globally" since each FileArchiverNotifier is
limited to its own Table.
persistSnapshotSizesForNamespaces(namespaceSnapshotSizes);
{code}
My only concern here is that, with an otherwise stable system, we'll be
creating load on the system, deleting and then re-writing the same
SpaceQuotaSnapshot.
Instead of deleting all SpaceQuotaSnapshots in the quota table, could you
submit deletions only for the HBase snapshots which we didn't compute a new
SpaceQuotaSnapshot for?
Sorry I missed your message last week on the approach. I think your
explanations make sense. Looking back at the code makes me agree with you – I
can't come up with something that wouldn't work.
> space quota issue: deleting snapshot doesn't update the usage of table
> ----------------------------------------------------------------------
>
> Key: HBASE-22086
> URL: https://issues.apache.org/jira/browse/HBASE-22086
> Project: HBase
> Issue Type: Bug
> Reporter: Ajeet Rai
> Assignee: Sakthi
> Priority: Minor
> Attachments: hbase-22086.master.001.patch
>
>
> space quota issue: deleting snapshot doesn't update the usage of table
> Steps: 1:
> set_quota TYPE => SPACE, TABLE => 'bugatti', LIMIT => '7M', POLICY =>
> NO_WRITES_COMPACTIONS
> 2: ./hbase pe --table="bugatti" --nomapred --rows=200 sequentialWrite 10
> 3: ./hbase pe --table="bugatti" --nomapred --rows=200 sequentialWrite 10
> 4: snapshot 'bugatti','bugatti_snapshot'
> 5: ./hbase pe --table="bugatti" --nomapred --rows=200 sequentialWrite 10
> 6: major_compact 'bugatti'
> 7: delete_snapshot 'bugatti_snapshot'
> now check the usage and observe that it is not getting updated.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)