This commit is contained in:
Suresh Kumar Anaparti 2026-01-21 15:16:00 +05:30
parent 5e0024f678
commit 77073a36b8
No known key found for this signature in database
GPG Key ID: D7CEAE3A9E71D0AA
2 changed files with 12 additions and 12 deletions

View File

@ -111,5 +111,17 @@ StateDao<ObjectInDataStoreStateMachine.State, ObjectInDataStoreStateMachine.Even
int expungeBySnapshotList(List<Long> snapshotIds, Long batchSize);
/**
* Returns the total physical size, in bytes, of all snapshots stored on primary
* storage for the specified account that have not yet been backed up to
* secondary storage.
*
* <p>If no such snapshots are found, this method returns {@code 0}.</p>
*
* @param accountId the ID of the account whose snapshots on primary storage
* should be considered
* @return the total physical size in bytes of matching snapshots on primary
* storage, or {@code 0} if none are found
*/
long getSnapshotsPhysicalSizeOnPrimaryStorageByAccountId(long accountId);
}

View File

@ -587,18 +587,6 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO
return batchExpunge(sc, batchSize);
}
/**
* Returns the total physical size, in bytes, of all snapshots stored on primary
* storage for the specified account that have not yet been backed up to
* secondary storage.
*
* <p>If no such snapshots are found, this method returns {@code 0}.</p>
*
* @param accountId the ID of the account whose snapshots on primary storage
* should be considered
* @return the total physical size in bytes of matching snapshots on primary
* storage, or {@code 0} if none are found
*/
@Override
public long getSnapshotsPhysicalSizeOnPrimaryStorageByAccountId(long accountId) {
long snapshotsPhysicalSize = 0;