Storage Quota for a Collection Not Updated when Deleting a Dataset
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
This is my entire process. Please note that quota reallocation seems to work well when deleting files within a dataset, but is not reallocated when deleting a dataset. See specifically steps 10-13 below.
- Create a collection
- Then, create a dataset (Image 001)
- I set the storage quota for the collection to 10MB:
$ curl -X POST -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/dataverses/$ID/storage/quota/$SIZE_IN_BYTES"
{"status":"OK","data":{"message":"Storage quota successfully set for the collection"}}
$ curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/dataverses/$ID/storage/quota"
{"status":"OK","data":{"message":"Total quota allocation for this collection: 10,485,760 bytes"}}
- Before uploading any files, a
10MBstorage quota is reflected in the UI (Image 002) - Big text file successfully uploaded at
3.9MB(Image 003) - The quota has successfully updated with this upload (Image 004)
- Let's delete
big.txtfrom the first dataset (Image 005) - Quota is reallocated (Image 006)
- Re-uploaded
big.txtto the same dataset - Created a second dataset also with
big.txt(Image 007) - The quota has updated to
2.3MB(Image 008) - Finally, let's delete the second dataset (Image 009)
- We see that the quota remains at
2.3MB(Image 010)
-
When does this issue occur?
When using collection quotas and deleting a dataset. -
Which page(s) does it occurs on?
dataset.xhtmlandeditdatafiles.xhtml. -
What happens?
The quota size is not updated correctly when deleting a dataset taking up space in the quota. -
To whom does it occur (all users, curators, superusers)?
All users (I performed this test as a superuser). -
What did you expect to happen?
I expected the quota to be reallocated upon deleting a dataset.
Which version of Dataverse are you using?
v6.5
Any related open or closed issues to this bug report?
None.
Screenshots:
Image 001
Image 002
Image 003
Image 004
Image 005
Image 006
Image 007
Image 008
Image 009
Image 010
Are you thinking about creating a pull request for this issue?
As of now, no.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the quota sequence using the collection storage-quota API, then inspect the deletion flow associated with dataset.xhtml and editdatafiles.xhtml. Confirm that deleting a dataset containing files reduces the collection's reported quota usage, matching the behavior already seen when deleting files within a dataset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100